Groovy Documentation

org.codenarc
[Groovy] Class CodeNarcRunner

java.lang.Object
  org.codenarc.CodeNarcRunner

class CodeNarcRunner

Helper class to run CodeNarc.

The following properties must be configured before invoking the execute() method:

NOTE: This is an internal class. Its API is subject to change.
Authors:
Chris Mair
Version:
\$Revision: 619 \$ - \$Date: 2011-02-27 15:38:33 -0500 (Sun, 27 Feb 2011) \$


Property Summary
List reportWriters

String ruleSetFiles

SourceAnalyzer sourceAnalyzer

 
Method Summary
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.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Property Detail

reportWriters

List reportWriters


ruleSetFiles

String ruleSetFiles


sourceAnalyzer

SourceAnalyzer sourceAnalyzer


 
Method Detail

createRuleSet

protected RuleSet createRuleSet()
Create and return the RuleSet that provides the source of Rules to be applied. The returned RuleSet may aggregate multiple underlying RuleSets.
Returns:
a single RuleSet


execute

Results execute()
The main entry point for this class. Runs CodeNarc and returns the results. Processing steps include:
  1. Parse the ruleSetFiles property to create a RuleSet.
  2. Configure the RuleSet from the "codenarc.properties" file, if that file is found on the classpath.
  3. Apply the configured SourceAnalyzer.
  4. Generate a report for each configured ReportWriter.
  5. Return the Results object representing the analysis results.
returns:
the Results object containing the results of the CodeNarc analysis.


 

Groovy Documentation