codenarc:verify
Full name:
io.github.crizzis:codenarc-maven-plugin:0.1:verify
Description:
Perform CodeNarc analysis, and optionally fail the build if
specified quality criteria are not met
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
test
. - Binds by default to the lifecycle phase:
verify
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<xmlOutput> |
boolean |
- |
Turn XML output on and off. This will effectively disable
generating the HTML report as well. Use this if you want to fail
the build without generating any output files Default value is: true .User property is: codenarc.xmlOutput . |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<additionalRuleSets> |
File[] |
- |
A list of custom CodeNarc ruleset files to use User property is: codenarc.additionalRulesets . |
<defaultRuleSets> |
List |
- |
The CodeNarc default rulesets to use. Defaults to rulesets/basic.xml,
rulesets/exceptions.xml,
rulesets/imports.xml Default value is: rulesets/basic.xml,rulesets/exceptions.xml,rulesets/imports.xml .User property is: codenarc.defaultRuleSets . |
<excludes> |
List |
- |
A collection of Ant-style file patterns specifying the files to
exclude from analysis. Takes precedence over
CodeNarcVerifyMojo.includes . The patterns defined here
are appended to the exclusion rules of any custom
CodeNarcVerifyMojo.sources /CodeNarcVerifyMojo.testSources
providedUser property is: codenarc.excludes . |
<ignoreExistingReport> |
boolean |
- |
Whether to ignore any pre-existing CodeNarc XML report. Setting
this property to true is intended for a scenario in
which generating the XML report and failing the build (if
violations have been found) needs to be split into separate
executions of this goalDefault value is: true .User property is: codenarc.ignoreExistingReport . |
<includeMain> |
boolean |
- |
Whether to include main classes in the analysis Default value is: true .User property is: codenarc.includeMain . |
<includeTests> |
boolean |
- |
Whether to include test classes in the analysis Default value is: false .User property is: codenarc.includeTests . |
<includes> |
List |
- |
A collection of Ant-style file patterns specifying the files to
analyze. The patterns defined here are appended to the inclusion
rules of any custom
CodeNarcVerifyMojo.sources /CodeNarcVerifyMojo.testSources
providedDefault value is: **/*.groovy .User property is: codenarc.includes . |
<maxPriority1Violations> |
int |
- |
Maximum number of priority 1 violations allowed before failing the
build (the default value of -1 means the build will not fail even
if violations occur) Default value is: -1 .User property is: codenarc.maxPriority1Violations . |
<maxPriority2Violations> |
int |
- |
Maximum number of priority 2 violations allowed before failing the
build (the default value of -1 means the build will not fail even
if violations occur) Default value is: -1 .User property is: codenarc.maxPriority2Violations . |
<maxPriority3Violations> |
int |
- |
Maximum number of priority 3 violations allowed before failing the
build (the default value of -1 means the build will not fail even
if violations occur) Default value is: -1 .User property is: codenarc.maxPriority3Violations . |
<skip> |
boolean |
- |
Set this to "true" to bypass CodeNarc verification entirely Default value is: false .User property is: codenarc.skip . |
<sources> |
FileSet[] |
- |
The filesets containing source files to be analyzed. Defaults to
${project.basedir /src/main/groovy/**/*.groovy}User property is: codenarc.sources . |
<testSources> |
FileSet[] |
- |
The filesets containing source files to be analyzed. Defaults to
${project.basedir /src/test/groovy/**/*.groovy}User property is: codenarc.testSources . |
<xmlOutputDirectory> |
File |
- |
Location where the generated XML report will be created Default value is: ${project.build.directory} .User property is: codenarc.xmlOutputDirectory . |
Parameter Details
<additionalRuleSets>
A list of custom CodeNarc ruleset files to use
- Type:
java.io.File[]
- Required:
No
- User Property:
codenarc.additionalRulesets
<defaultRuleSets>
The CodeNarc default rulesets to use. Defaults to rulesets/basic.xml,
rulesets/exceptions.xml,
rulesets/imports.xml
- Type:
java.util.List
- Required:
No
- User Property:
codenarc.defaultRuleSets
- Default:
rulesets/basic.xml,rulesets/exceptions.xml,rulesets/imports.xml
<excludes>
A collection of Ant-style file patterns specifying the files to
exclude from analysis. Takes precedence over
CodeNarcVerifyMojo.includes
. The patterns defined here
are appended to the exclusion rules of any custom
CodeNarcVerifyMojo.sources
/CodeNarcVerifyMojo.testSources
provided- Type:
java.util.List
- Required:
No
- User Property:
codenarc.excludes
<ignoreExistingReport>
Whether to ignore any pre-existing CodeNarc XML report. Setting
this property to
true
is intended for a scenario in
which generating the XML report and failing the build (if
violations have been found) needs to be split into separate
executions of this goal- Type:
boolean
- Required:
No
- User Property:
codenarc.ignoreExistingReport
- Default:
true
<includeMain>
Whether to include main classes in the analysis
- Type:
boolean
- Required:
No
- User Property:
codenarc.includeMain
- Default:
true
<includeTests>
Whether to include test classes in the analysis
- Type:
boolean
- Required:
No
- User Property:
codenarc.includeTests
- Default:
false
<includes>
A collection of Ant-style file patterns specifying the files to
analyze. The patterns defined here are appended to the inclusion
rules of any custom
CodeNarcVerifyMojo.sources
/CodeNarcVerifyMojo.testSources
provided- Type:
java.util.List
- Required:
No
- User Property:
codenarc.includes
- Default:
**/*.groovy
<maxPriority1Violations>
Maximum number of priority 1 violations allowed before failing the
build (the default value of -1 means the build will not fail even
if violations occur)
- Type:
int
- Required:
No
- User Property:
codenarc.maxPriority1Violations
- Default:
-1
<maxPriority2Violations>
Maximum number of priority 2 violations allowed before failing the
build (the default value of -1 means the build will not fail even
if violations occur)
- Type:
int
- Required:
No
- User Property:
codenarc.maxPriority2Violations
- Default:
-1
<maxPriority3Violations>
Maximum number of priority 3 violations allowed before failing the
build (the default value of -1 means the build will not fail even
if violations occur)
- Type:
int
- Required:
No
- User Property:
codenarc.maxPriority3Violations
- Default:
-1
<skip>
Set this to "true" to bypass CodeNarc verification entirely
- Type:
boolean
- Required:
No
- User Property:
codenarc.skip
- Default:
false
<sources>
The filesets containing source files to be analyzed. Defaults to
${project.basedir
/src/main/groovy/**/*.groovy}- Type:
org.apache.maven.model.FileSet[]
- Required:
No
- User Property:
codenarc.sources
<testSources>
The filesets containing source files to be analyzed. Defaults to
${project.basedir
/src/test/groovy/**/*.groovy}- Type:
org.apache.maven.model.FileSet[]
- Required:
No
- User Property:
codenarc.testSources
<xmlOutput>
Turn XML output on and off. This will effectively disable
generating the HTML report as well. Use this if you want to fail
the build without generating any output files
- Type:
boolean
- Required:
Yes
- User Property:
codenarc.xmlOutput
- Default:
true
<xmlOutputDirectory>
Location where the generated XML report will be created
- Type:
java.io.File
- Required:
No
- User Property:
codenarc.xmlOutputDirectory
- Default:
${project.build.directory}