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