Class CheckstyleReportGenerator
- java.lang.Object
-
- org.apache.maven.plugins.checkstyle.CheckstyleReportGenerator
-
public class CheckstyleReportGenerator extends Object
Generate a report based on CheckstyleResults.- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description CheckstyleReportGenerator(org.apache.maven.doxia.sink.Sink sink, ResourceBundle bundle, File basedir, org.apache.maven.doxia.tools.SiteTool siteTool, String ruleset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateReport(CheckstyleResults results)
com.puppycrawl.tools.checkstyle.api.Configuration
getCheckstyleConfig()
org.apache.maven.plugin.logging.Log
getLog()
com.puppycrawl.tools.checkstyle.api.SeverityLevel
getSeverityLevel()
List<String>
getTreeWalkerNames()
String
getXrefLocation()
boolean
isEnableFilesSummary()
boolean
isEnableRSS()
boolean
isEnableRulesSummary()
boolean
isEnableSeveritySummary()
boolean
matchRule(com.puppycrawl.tools.checkstyle.api.AuditEvent event, String ruleName, String expectedMessage, String expectedSeverity)
Check if a violation matches a rule.void
setCheckstyleConfig(com.puppycrawl.tools.checkstyle.api.Configuration config)
void
setEnableFilesSummary(boolean enableFilesSummary)
void
setEnableRSS(boolean enableRSS)
void
setEnableRulesSummary(boolean enableRulesSummary)
void
setEnableSeveritySummary(boolean enableSeveritySummary)
void
setLog(org.apache.maven.plugin.logging.Log log)
void
setSeverityLevel(com.puppycrawl.tools.checkstyle.api.SeverityLevel severityLevel)
void
setTreeWalkerNames(List<String> treeWalkerNames)
void
setXrefLocation(String xrefLocation)
List<org.apache.maven.plugins.checkstyle.CheckstyleReportGenerator.ConfReference>
sortConfiguration(CheckstyleResults results)
-
-
-
Constructor Detail
-
CheckstyleReportGenerator
public CheckstyleReportGenerator(org.apache.maven.doxia.sink.Sink sink, ResourceBundle bundle, File basedir, org.apache.maven.doxia.tools.SiteTool siteTool, String ruleset)
-
-
Method Detail
-
getLog
public org.apache.maven.plugin.logging.Log getLog()
-
setLog
public void setLog(org.apache.maven.plugin.logging.Log log)
-
generateReport
public void generateReport(CheckstyleResults results)
-
matchRule
public boolean matchRule(com.puppycrawl.tools.checkstyle.api.AuditEvent event, String ruleName, String expectedMessage, String expectedSeverity)
Check if a violation matches a rule.- Parameters:
event
- the violation to checkruleName
- The name of the ruleexpectedMessage
- A message that, if it's not null, will be matched to the message from the violationexpectedSeverity
- A severity that, if it's not null, will be matched to the severity from the violation- Returns:
- The number of rule violations
-
getSeverityLevel
public com.puppycrawl.tools.checkstyle.api.SeverityLevel getSeverityLevel()
-
setSeverityLevel
public void setSeverityLevel(com.puppycrawl.tools.checkstyle.api.SeverityLevel severityLevel)
-
isEnableRulesSummary
public boolean isEnableRulesSummary()
-
setEnableRulesSummary
public void setEnableRulesSummary(boolean enableRulesSummary)
-
isEnableSeveritySummary
public boolean isEnableSeveritySummary()
-
setEnableSeveritySummary
public void setEnableSeveritySummary(boolean enableSeveritySummary)
-
isEnableFilesSummary
public boolean isEnableFilesSummary()
-
setEnableFilesSummary
public void setEnableFilesSummary(boolean enableFilesSummary)
-
isEnableRSS
public boolean isEnableRSS()
-
setEnableRSS
public void setEnableRSS(boolean enableRSS)
-
getXrefLocation
public String getXrefLocation()
-
setXrefLocation
public void setXrefLocation(String xrefLocation)
-
getCheckstyleConfig
public com.puppycrawl.tools.checkstyle.api.Configuration getCheckstyleConfig()
-
setCheckstyleConfig
public void setCheckstyleConfig(com.puppycrawl.tools.checkstyle.api.Configuration config)
-
sortConfiguration
public List<org.apache.maven.plugins.checkstyle.CheckstyleReportGenerator.ConfReference> sortConfiguration(CheckstyleResults results)
-
-