Package org.codenarc
Class CodeNarc
- java.lang.Object
-
- org.codenarc.CodeNarc
-
- All Implemented Interfaces:
groovy.lang.GroovyObject
public class CodeNarc extends Object implements groovy.lang.GroovyObject
-
-
Field Summary
Fields Modifier and Type Field Description protected String
baseDir
protected groovy.lang.Closure
createCodeNarcRunner
protected String
excludes
protected static String
HELP
protected String
includes
protected int
maxPriority1Violations
protected int
maxPriority2Violations
protected int
maxPriority3Violations
protected List
reports
protected String
ruleSetFiles
protected static groovy.lang.Closure
systemExit
protected String
title
-
Constructor Summary
Constructors Constructor Description CodeNarc()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkMaxViolations(Results results, int priority, int max)
protected SourceAnalyzer
createSourceAnalyzer()
protected void
execute(String... args)
groovy.lang.MetaClass
getMetaClass()
Object
getProperty(String property)
Object
invokeMethod(String method, Object arguments)
static void
main(String... args)
protected void
parseArgs(String... args)
protected void
setDefaultsIfNecessary()
void
setMetaClass(groovy.lang.MetaClass mc)
void
setProperty(String property, Object value)
-
-
-
Field Detail
-
HELP
protected static final String HELP
- See Also:
- Constant Field Values
-
systemExit
protected static groovy.lang.Closure systemExit
-
ruleSetFiles
protected String ruleSetFiles
-
baseDir
protected String baseDir
-
includes
protected String includes
-
excludes
protected String excludes
-
title
protected String title
-
reports
protected List reports
-
createCodeNarcRunner
protected groovy.lang.Closure createCodeNarcRunner
-
maxPriority1Violations
protected int maxPriority1Violations
-
maxPriority2Violations
protected int maxPriority2Violations
-
maxPriority3Violations
protected int maxPriority3Violations
-
-
Method Detail
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
-
invokeMethod
public Object invokeMethod(String method, Object arguments)
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
public Object getProperty(String property)
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
main
public static void main(String... args)
-
execute
protected void execute(String... args)
-
setDefaultsIfNecessary
protected void setDefaultsIfNecessary()
-
checkMaxViolations
protected void checkMaxViolations(Results results, int priority, int max)
-
createSourceAnalyzer
protected SourceAnalyzer createSourceAnalyzer()
-
parseArgs
protected void parseArgs(String... args)
-
-