Helper class to run CodeNarc.
The following properties must be configured before invoking theexecute() method:
rulesetfiles - The path to the Groovy or XML RuleSet definition files, relative to the classpath. This can be a
single file path, or multiple paths separated by commas.sourceAnalyzer - An instance of a org.codenarc.analyzer.SourceAnalyzer implementation.reportWriters - The list of ReportWriter instances. A report is generated
for each element in this list. At least one ReportWriter must be configured.| Type | Name and description |
|---|---|
List |
reportWriters |
String |
ruleSetFiles |
SourceAnalyzer |
sourceAnalyzer |
| Type | Name and description |
|---|---|
protected RuleSet |
createRuleSet()Create and return the RuleSet that provides the source of Rules to be applied. |
Results |
execute()The main entry point for this class. |
Create and return the RuleSet that provides the source of Rules to be applied. The returned RuleSet may aggregate multiple underlying RuleSets.
The main entry point for this class. Runs CodeNarc and returns the results. Processing steps include:
ruleSetFiles property to create a RuleSet.SourceAnalyzer.ReportWriter.Results object representing the analysis results.Results object containing the results of the CodeNarc analysis.