@java.lang.SuppressWarnings(value: DuplicateMapLiteral) abstract class AbstractHtmlReportWriter extends AbstractReportWriter
Abstract superclass for HTML ReportWriter classes.
Modifiers | Name | Description |
---|---|---|
protected static java.lang.String |
CSS_FILE |
|
protected static java.lang.String |
LOGO_FILE |
|
protected static int |
MAX_SOURCE_LINE_LENGTH |
|
protected static int |
SOURCE_LINE_LAST_SEGMENT_LENGTH |
Fields inherited from class | Fields |
---|---|
class AbstractReportWriter |
BASE_MESSAGES_BUNDLE, CODENARC_URL, CUSTOM_MESSAGES_BUNDLE, customMessagesBundleName, getTimestamp, initializeResourceBundle, resourceBundle |
Type | Name and description |
---|---|
boolean |
includeRuleDescriptions |
int |
maxPriority |
java.lang.String |
title |
Constructor and description |
---|
AbstractHtmlReportWriter
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected abstract groovy.lang.Closure |
buildBodySection(AnalysisContext analysisContext, Results results) |
|
protected groovy.lang.Closure |
buildCSS() |
|
protected groovy.lang.Closure |
buildHeaderSection() |
|
protected groovy.lang.Closure |
buildLogo() |
|
protected groovy.lang.Closure |
buildReportMetadata() |
|
protected groovy.lang.Closure |
buildRuleDescriptions(AnalysisContext analysisContext) |
|
protected groovy.lang.Closure |
buildScript() |
|
protected java.lang.String |
buildTitle() |
|
protected java.lang.String |
formatSourceLine(java.lang.String sourceLine, int startColumn) Format and trim the source line. |
|
protected java.lang.String |
getCssFile() |
|
protected boolean |
isDirectoryContainingFiles(Results results) Return true if the Results represents a directory that contains at least one file |
|
protected boolean |
isDirectoryContainingFilesWithViolations(Results results) Return true if the Results represents a directory that contains at least one file with one or more violations. |
|
void |
writeReport(java.io.Writer writer, AnalysisContext analysisContext, Results results) Write out a report to the specified Writer for the analysis results |
Methods inherited from class | Name |
---|---|
class AbstractReportWriter |
getCodeNarcVersion, getDescriptionForRule, getFormattedTimestamp, getHtmlDescriptionForRule, getResourceBundleString, getSortedRules, initializeDefaultResourceBundle, isEnabled, isWriteToStandardOut, writeReport, writeReport |
Format and trim the source line. If the whole line fits, then include the whole line (trimmed). Otherwise, remove characters from the middle to truncate to the max length.
sourceLine
- - the source line to formatstartColumn
- - the starting column index; used to truncate the line if it's too long; defaults to 0Return true if the Results represents a directory that contains at least one file
results
- - the ResultsReturn true if the Results represents a directory that contains at least one file with one or more violations.
results
- - the ResultsWrite out a report to the specified Writer for the analysis results
analysisContext
- - the AnalysisContext containing the analysis configuration informationresults
- - the analysis resultsGroovy Documentation