This goal should be used as a Maven report.
A reporting task that performs Checkstyle analysis and generates an HTML report on any violations that Checkstyle finds.
Parameter Details <cacheFile>Specifies the cache file used to speed up Checkstyle on successive runs.
java.lang.String
No
${project.build.directory}/checkstyle-cachefile
By using this property, you can specify the whole Checkstyle rules inline directly inside this pom.
<plugin> ... <configuration> <checkstyleRules> <module name="Checker"> <module name="FileTabCharacter"> <property name="eachLine" value="true" /> </module> <module name="TreeWalker"> <module name="EmptyBlock"/> </module> </module> </checkstyleRules> </configuration> ...
org.codehaus.plexus.configuration.PlexusConfiguration
2.12
No
The header to use for the inline configuration. Only used when you specify checkstyleRules
.
java.lang.String
No
<?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
Specifies the location of the XML configuration to use.
Potential values are a filesystem path, a URL, or a classpath resource. This parameter expects that the contents of the location conform to the xml format (Checkstyle Checker module) configuration of rulesets.
This parameter is resolved as resource, URL, then file. If successfully resolved, the contents of the configuration is copied into the ${project.build.directory}/checkstyle-configuration.xml
file before being passed to Checkstyle as a configuration.
There are 2 predefined rulesets included in Maven Checkstyle Plugin:
sun_checks.xml
: Sun Checks.google_checks.xml
: Google Checks.java.lang.String
No
checkstyle.config.location
sun_checks.xml
Output errors to console.
boolean
No
checkstyle.consoleOutput
false
Specifies if the Files summary should be enabled or not.
boolean
No
checkstyle.enable.files.summary
true
Specifies if the Rules summary should be enabled or not.
boolean
No
checkstyle.enable.rules.summary
true
Specifies if the Severity summary should be enabled or not.
boolean
No
checkstyle.enable.severity.summary
true
Specifies whether generated source files should be excluded from Checkstyle.
boolean
3.3.1
No
checkstyle.excludeGeneratedSources
false
Specifies the names filter of the source files to be excluded for Checkstyle.
java.lang.String
No
checkstyle.excludes
Specifies if the build should fail upon a violation.
boolean
No
false
Specifies the location of the License file (a.k.a. the header file) that can be used by Checkstyle to verify that source code has the correct license header.
You need to use ${checkstyle.header.file}
in your Checkstyle xml configuration to reference the name of this header file.
For instance:
<module name="RegexpHeader"> <property name="headerFile" value="${checkstyle.header.file}"/> </module>
java.lang.String
2.0-beta-2
No
checkstyle.header.file
LICENSE.txt
Specifies whether to include the resource directories in the check.
boolean
2.11
Yes
checkstyle.includeResources
true
Specifies whether to include the test resource directories in the check.
boolean
2.11
Yes
checkstyle.includeTestResources
true
Include or not the test source directory/directories to be used for Checkstyle.
boolean
2.2
No
false
Specifies the names filter of the source files to be used for Checkstyle.
java.lang.String
Yes
checkstyle.includes
**\/*.java
Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.
boolean
2.1
No
linkXRef
true
The locale to use when the report generation is invoked directly as a standalone Mojo.
See also: SiteTool#DEFAULT_LOCALE, SiteTool#getSiteLocales(String)
java.lang.String
No
default
Specifies whether modules with a configured severity of ignore
should be omitted during Checkstyle invocation.
boolean
3.0.0
No
false
The shared output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the shared output directory configured in the
Maven Site Pluginis used instead.
A plugin may use any subdirectory structure (either using a hard-coded name or, ideally, an additional user-defined mojo parameter with a default value) to generate multi-page reports or external reports with the main output file (entry point) denoted by #getOutputName()
.
java.io.File
Yes
${project.build.directory}/reports
Specifies the path and filename to save the Checkstyle output. The format of the output file is determined by the outputFileFormat
parameter.
java.io.File
No
checkstyle.output.file
${project.build.directory}/checkstyle-result.xml
Specifies the format of the output to be used when writing to the output file. Valid values are "plain
", "sarif
" and "xml
".
java.lang.String
No
checkstyle.output.format
xml
The report output format: null by default, to represent a site, but can be configured to a Doxia Sink id.
java.lang.String
No
output.format
Timestamp for reproducible output archive entries, either formatted as ISO 8601
yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like
SOURCE_DATE_EPOCH).
java.lang.String
No
${project.build.outputTimestamp}
Specifies the location of the properties file.
This parameter is resolved as URL, File then resource. If successfully resolved, the contents of the properties location is copied into the ${project.build.directory}/checkstyle-checker.properties
file before being passed to Checkstyle for loading.
The contents of the propertiesLocation
will be made available to Checkstyle for specifying values for parameters within the xml configuration (specified in the configLocation
parameter).
java.lang.String
2.0-beta-2
No
checkstyle.properties.location
Allows for specifying raw property expansion information.
java.lang.String
No
Specifies the names filter of the resource files to be excluded for Checkstyle.
java.lang.String
2.11
No
checkstyle.resourceExcludes
Specifies the names filter of the resource files to be used for Checkstyle.
java.lang.String
2.11
Yes
checkstyle.resourceIncludes
**/*.properties
Dump file for inlined Checkstyle rules.
java.io.File
No
checkstyle.output.rules.file
${project.build.directory}/checkstyle-rules.xml
Directory containing the site.xml
file.
java.io.File
No
${basedir}/src/site
Skip entire check.
boolean
2.2
No
checkstyle.skip
false
Specifies the location of the source directories to be used for Checkstyle. Default value is ${project.compileSourceRoots}
.
java.util.List<java.lang.String>
2.13
No
instead use
sourceDirectories
. For version 3.0.0, this parameter is only defined to break the build if you use it!
Specifies the location of the source directory to be used for Checkstyle.
java.io.File
No
The key to be used in the properties for the suppressions file.
java.lang.String
2.1
No
checkstyle.suppression.expression
checkstyle.suppressions.file
Specifies the location of the suppressions XML file to use.
This parameter is resolved as resource, URL, then file. If successfully resolved, the contents of the suppressions XML is copied into the ${project.build.directory}/checkstyle-supressions.xml
file before being passed to Checkstyle for loading.
See suppressionsFileExpression
for the property that will be made available to your Checkstyle configuration.
java.lang.String
2.0-beta-2
No
checkstyle.suppressions.location
Specifies the location of the test source directories to be used for Checkstyle. Default value is ${project.testCompileSourceRoots}
.
java.util.List<java.lang.String>
2.13
No
instead use
testSourceDirectories
. For version 3.0.0, this parameter is only defined to break the build if you use it!
Specifies the location of the test source directory to be used for Checkstyle.
java.io.File
2.2
No
When using custom treeWalkers, specify their names here so the checks inside the treeWalker end up the the rule-summary.
java.util.List<java.lang.String>
2.11
No
If null
, the Checkstyle plugin will display violations on stdout. Otherwise, a text file will be created with the violations.
java.io.File
No
Location where Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory()
+ /xref
java.io.File
No
Location where Test Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory()
+ /xref-test
java.io.File
No
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4