public class CheckstyleReportGenerator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
CheckstyleReportGenerator.ChainedItem<T> |
private static class |
CheckstyleReportGenerator.ConfReference |
| Modifier and Type | Field and Description |
|---|---|
private java.io.File |
basedir |
private java.util.ResourceBundle |
bundle |
private com.puppycrawl.tools.checkstyle.api.Configuration |
checkstyleConfig |
private boolean |
enableFilesSummary |
private boolean |
enableRSS |
private boolean |
enableRulesSummary |
private boolean |
enableSeveritySummary |
private IconTool |
iconTool |
private org.apache.maven.plugin.logging.Log |
log |
private java.lang.String |
ruleset |
private com.puppycrawl.tools.checkstyle.api.SeverityLevel |
severityLevel |
private org.apache.maven.doxia.sink.Sink |
sink |
private org.apache.maven.doxia.tools.SiteTool |
siteTool |
private java.util.List<java.lang.String> |
treeWalkerNames |
private java.lang.String |
xrefLocation |
| Constructor and Description |
|---|
CheckstyleReportGenerator(org.apache.maven.doxia.sink.Sink sink,
java.util.ResourceBundle bundle,
java.io.File basedir,
org.apache.maven.doxia.tools.SiteTool siteTool,
java.lang.String ruleset) |
| Modifier and Type | Method and Description |
|---|---|
private void |
doDetails(CheckstyleResults results) |
private void |
doFileEvents(java.util.List<com.puppycrawl.tools.checkstyle.api.AuditEvent> eventList,
java.lang.String filename) |
private void |
doFilesSummary(CheckstyleResults results) |
private void |
doHeading() |
private void |
doRuleRow(CheckstyleReportGenerator.ConfReference ref,
CheckstyleResults results,
java.lang.String previousCategory)
Create a summary for one Checkstyle rule.
|
private void |
doRulesSummary(CheckstyleResults results)
Create the rules summary section of the report.
|
private void |
doSeveritySummary(CheckstyleResults results) |
void |
generateReport(CheckstyleResults results) |
com.puppycrawl.tools.checkstyle.api.Configuration |
getCheckstyleConfig() |
private java.lang.String |
getCheckstyleVersion()
Get the effective Checkstyle version at runtime.
|
private java.lang.String |
getConfigAttribute(com.puppycrawl.tools.checkstyle.api.Configuration config,
CheckstyleReportGenerator.ChainedItem<com.puppycrawl.tools.checkstyle.api.Configuration> parentConfiguration,
java.lang.String attributeName,
java.lang.String defaultValue)
Get the value of the specified attribute from the Checkstyle configuration.
|
org.apache.maven.plugin.logging.Log |
getLog() |
com.puppycrawl.tools.checkstyle.api.SeverityLevel |
getSeverityLevel() |
private java.lang.String |
getTitle() |
java.util.List<java.lang.String> |
getTreeWalkerNames() |
java.lang.String |
getXrefLocation() |
boolean |
isEnableFilesSummary() |
boolean |
isEnableRSS() |
boolean |
isEnableRulesSummary() |
boolean |
isEnableSeveritySummary() |
boolean |
matchRule(com.puppycrawl.tools.checkstyle.api.AuditEvent event,
java.lang.String ruleName,
java.lang.String expectedMessage,
java.lang.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(java.util.List<java.lang.String> treeWalkerNames) |
void |
setXrefLocation(java.lang.String xrefLocation) |
java.util.List<CheckstyleReportGenerator.ConfReference> |
sortConfiguration(CheckstyleResults results) |
private void |
sortConfiguration(java.util.List<CheckstyleReportGenerator.ConfReference> result,
com.puppycrawl.tools.checkstyle.api.Configuration config,
CheckstyleReportGenerator.ChainedItem<com.puppycrawl.tools.checkstyle.api.Configuration> parent,
CheckstyleResults results) |
private org.apache.maven.plugin.logging.Log log
private final java.io.File basedir
private final java.util.ResourceBundle bundle
private final org.apache.maven.doxia.sink.Sink sink
private com.puppycrawl.tools.checkstyle.api.SeverityLevel severityLevel
private com.puppycrawl.tools.checkstyle.api.Configuration checkstyleConfig
private boolean enableRulesSummary
private boolean enableSeveritySummary
private boolean enableFilesSummary
private boolean enableRSS
private final org.apache.maven.doxia.tools.SiteTool siteTool
private java.lang.String xrefLocation
private java.util.List<java.lang.String> treeWalkerNames
private final IconTool iconTool
private final java.lang.String ruleset
public CheckstyleReportGenerator(org.apache.maven.doxia.sink.Sink sink,
java.util.ResourceBundle bundle,
java.io.File basedir,
org.apache.maven.doxia.tools.SiteTool siteTool,
java.lang.String ruleset)
public org.apache.maven.plugin.logging.Log getLog()
public void setLog(org.apache.maven.plugin.logging.Log log)
private java.lang.String getTitle()
public void generateReport(CheckstyleResults results)
private void doHeading()
private java.lang.String getConfigAttribute(com.puppycrawl.tools.checkstyle.api.Configuration config,
CheckstyleReportGenerator.ChainedItem<com.puppycrawl.tools.checkstyle.api.Configuration> parentConfiguration,
java.lang.String attributeName,
java.lang.String defaultValue)
config - The current Checkstyle configurationparentConfiguration - The configuration of the parent of the current configurationattributeName - The name of the attributedefaultValue - The default value to use if the attribute cannot be found in any configurationprivate void doRulesSummary(CheckstyleResults results)
results - The results to summarizeprivate void doRuleRow(CheckstyleReportGenerator.ConfReference ref, CheckstyleResults results, java.lang.String previousCategory)
ref - The configuration reference for the rowresults - The results to summarizepreviousCategory - The previous row's categorypublic boolean matchRule(com.puppycrawl.tools.checkstyle.api.AuditEvent event,
java.lang.String ruleName,
java.lang.String expectedMessage,
java.lang.String expectedSeverity)
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 violationprivate void doSeveritySummary(CheckstyleResults results)
private void doFilesSummary(CheckstyleResults results)
private void doDetails(CheckstyleResults results)
private void doFileEvents(java.util.List<com.puppycrawl.tools.checkstyle.api.AuditEvent> eventList,
java.lang.String filename)
public com.puppycrawl.tools.checkstyle.api.SeverityLevel getSeverityLevel()
public void setSeverityLevel(com.puppycrawl.tools.checkstyle.api.SeverityLevel severityLevel)
public boolean isEnableRulesSummary()
public void setEnableRulesSummary(boolean enableRulesSummary)
public boolean isEnableSeveritySummary()
public void setEnableSeveritySummary(boolean enableSeveritySummary)
public boolean isEnableFilesSummary()
public void setEnableFilesSummary(boolean enableFilesSummary)
public boolean isEnableRSS()
public void setEnableRSS(boolean enableRSS)
public java.lang.String getXrefLocation()
public void setXrefLocation(java.lang.String xrefLocation)
public com.puppycrawl.tools.checkstyle.api.Configuration getCheckstyleConfig()
public void setCheckstyleConfig(com.puppycrawl.tools.checkstyle.api.Configuration config)
public void setTreeWalkerNames(java.util.List<java.lang.String> treeWalkerNames)
public java.util.List<java.lang.String> getTreeWalkerNames()
private java.lang.String getCheckstyleVersion()
null)public java.util.List<CheckstyleReportGenerator.ConfReference> sortConfiguration(CheckstyleResults results)
private void sortConfiguration(java.util.List<CheckstyleReportGenerator.ConfReference> result, com.puppycrawl.tools.checkstyle.api.Configuration config, CheckstyleReportGenerator.ChainedItem<com.puppycrawl.tools.checkstyle.api.Configuration> parent, CheckstyleResults results)