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.StringbaseDirprotected groovy.lang.ClosurecreateCodeNarcRunnerprotected java.lang.Stringexcludesprotected static java.lang.StringHELPprotected java.lang.Stringincludesprotected intmaxPriority1Violationsprotected intmaxPriority2Violationsprotected intmaxPriority3Violationsprotected java.util.Listreportsprotected java.lang.StringruleSetFilesprotected static groovy.lang.ClosuresystemExitprotected java.lang.Stringtitle
-
Constructor Summary
Constructors Constructor Description CodeNarc()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckMaxViolations(Results results, int priority, int max)protected SourceAnalyzercreateSourceAnalyzer()protected voidexecute(java.lang.String... args)groovy.lang.MetaClassgetMetaClass()java.lang.ObjectgetProperty(java.lang.String property)java.lang.ObjectinvokeMethod(java.lang.String method, java.lang.Object arguments)static voidmain(java.lang.String... args)protected voidparseArgs(java.lang.String... args)protected voidsetDefaultsIfNecessary()voidsetMetaClass(groovy.lang.MetaClass mc)voidsetProperty(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:
getMetaClassin interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject
-
invokeMethod
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)- Specified by:
setPropertyin 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)
-
-