abstract class AbstractReportWriter extends java.lang.Object implements ReportWriter
Abstract superclass for ReportWriter implementation classes.
Subclasses must implement thewriteReport(ResultsNode, MetricSet, Writer)
method
and define a defaultOutputFile
property.` Modifiers | Name | Description |
---|---|---|
protected static java.lang.String |
BASE_MESSAGES_BUNDLE |
|
protected static java.lang.String |
CODENARC_URL |
|
protected static java.lang.String |
CUSTOM_MESSAGES_BUNDLE |
|
protected java.lang.String |
customMessagesBundleName |
|
protected groovy.lang.Closure |
getTimestamp |
|
protected groovy.lang.Closure |
initializeResourceBundle |
|
protected java.util.ResourceBundle |
resourceBundle |
Type | Name and description |
---|---|
java.lang.String |
outputFile |
java.lang.Object |
writeToStandardOut |
Constructor and description |
---|
AbstractReportWriter
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected java.lang.String |
getCodeNarcVersion() |
|
protected java.lang.String |
getDescriptionForRule(Rule rule) |
|
protected java.lang.String |
getFormattedTimestamp() |
|
protected java.lang.String |
getHtmlDescriptionForRule(Rule rule) |
|
protected java.lang.String |
getResourceBundleString(java.lang.String resourceKey, java.lang.String defaultString, boolean logWarning) |
|
protected java.util.List |
getSortedRules(AnalysisContext analysisContext) |
|
protected void |
initializeDefaultResourceBundle() |
|
protected boolean |
isEnabled(Rule rule) |
|
boolean |
isWriteToStandardOut() |
|
abstract void |
writeReport(java.io.Writer writer, AnalysisContext analysisContext, Results results) |
|
void |
writeReport(AnalysisContext analysisContext, Results results) Write out a report for the specified analysis results |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Write out a report for the specified analysis results
analysisContext
- - the AnalysisContext containing the analysis configuration informationresults
- - the analysis resultsGroovy Documentation