Package: groovy.org.codenarc.report

## [Groovy] Class AbstractReportWriter

- groovy.org.codenarc.report.AbstractReportWriter

- All Implemented Interfaces and Traits:
    ReportWriter

      abstract class AbstractReportWriter

  Abstract superclass for ReportWriter implementation classes.

  Subclasses must implement the `writeReport(ResultsNode, MetricSet, Writer)` method and define a `defaultOutputFile` property.
  Authors:
    Chris Mair

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static def` | `BASE_MESSAGES_BUNDLE` |
    `protected static def` | `CODENARC_URL` |
    `protected static def` | `CUSTOM_MESSAGES_BUNDLE` |
    `protected static def` | `VERSION_FILE` |
    `protected def` | `customMessagesBundleName` |
    `protected def` | `getTimestamp` |
    `protected def` | `initializeResourceBundle` |
    `protected def` | `resourceBundle` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `String` | `outputFile`
    `Object` | `writeToStandardOut`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected String` | `getCodeNarcVersion()`
    `` | `protected String` | `getDescriptionForRule(Rule rule)`
    `` | `protected String` | `getFormattedTimestamp()`
    `` | `protected String` | `getHtmlDescriptionForRule(Rule rule)`
    `` | `protected String` | `getResourceBundleString(String resourceKey, String defaultString = '?', boolean logWarning = true)`
    `` | `protected List` | `getSortedRules(AnalysisContext analysisContext)`
    `` | `protected void` | `initializeDefaultResourceBundle()`
    `` | `protected boolean` | `isEnabled(Rule rule)`
    `` | `void` | `writeReport(Writer writer, AnalysisContext analysisContext, Results results)`
    `` | `void` | `writeReport(AnalysisContext analysisContext, Results results)` Write out a report for the specified analysis results

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### protected static final def BASE_MESSAGES_BUNDLE

    - #### protected static final def CODENARC_URL

    - #### protected static final def CUSTOM_MESSAGES_BUNDLE

    - #### protected static final def VERSION_FILE

    - #### protected def customMessagesBundleName

    - #### protected def getTimestamp

    - #### protected def initializeResourceBundle

    - #### protected def resourceBundle

  - ### Property Detail

    - #### String outputFile

    - #### Object writeToStandardOut

  - ### Method Detail

    - #### protected String getCodeNarcVersion()

    - #### protected String getDescriptionForRule(Rule rule)

    - #### protected String getFormattedTimestamp()

    - #### protected String getHtmlDescriptionForRule(Rule rule)

    - #### protected String getResourceBundleString(String resourceKey, String defaultString = '?', boolean logWarning = true)

    - #### protected List getSortedRules(AnalysisContext analysisContext)

    - #### protected void initializeDefaultResourceBundle()

    - #### protected boolean isEnabled(Rule rule)

    - #### void writeReport(Writer writer, AnalysisContext analysisContext, Results results)

    - #### void writeReport(AnalysisContext analysisContext, Results results)

      Write out a report for the specified analysis results

      Parameters:
        `analysisContext` - - the AnalysisContext containing the analysis configuration information
        `results` - - the analysis results