@java.lang.SuppressWarnings(value: [Println, PrintStackTrace]) class CodeNarc extends java.lang.Object
Command-line runner for CodeNarc.
The supported command-line parameters are all of the form: "-OPTION=VALUE", where OPTION is one of the options in the following list.Modifiers | Name | Description |
---|---|---|
protected static java.lang.String |
HELP |
|
protected java.lang.String |
baseDir |
|
protected groovy.lang.Closure |
createCodeNarcRunner |
|
protected java.lang.String |
excludes |
|
protected java.lang.String |
includes |
|
protected int |
maxPriority1Violations |
|
protected int |
maxPriority2Violations |
|
protected int |
maxPriority3Violations |
|
protected java.lang.String |
plugins |
|
protected java.lang.String |
propertiesFilename |
|
protected java.util.List |
reports |
|
protected java.lang.String |
ruleSetFiles |
|
protected java.lang.String |
ruleset |
|
protected java.lang.String |
sourceFiles |
|
protected static groovy.lang.Closure |
systemExit |
|
protected java.lang.String |
title |
Type | Name and description |
---|---|
java.lang.String |
excludeBaseline The path to a Baseline Violations report (report type "baseline"). |
boolean |
failOnError Whether to terminate and fail the task if errors occur parsing source files (true), or just log the errors (false) |
Constructor and description |
---|
CodeNarc
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
checkMaxViolations(Results results, int priority, int max) |
|
protected SourceAnalyzer |
createSourceAnalyzer() Create and return the SourceAnalyzer |
|
protected void |
execute(java.lang.String[] args) |
|
static void |
main(java.lang.String[] args) Main command-line entry-point. |
|
protected void |
parseArgs(java.lang.String[] args) |
|
protected void |
setDefaultsIfNecessary() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The path to a Baseline Violations report (report type "baseline"). If set, then all violations specified within that report are excluded (filtered) from the current CodeNarc run. If null/empty, then do nothing.
Whether to terminate and fail the task if errors occur parsing source files (true), or just log the errors (false)
Create and return the SourceAnalyzer
Main command-line entry-point. Run the CodeNarc application.
args
- - the String[] of command-line argumentsGroovy Documentation