This coverage report was created for Google Java Style( cached page), version of 03 Feb 2022.
"--" - There is no rule in this paragraph.
"↓" - This paragraph is the high-level point of some group.
- Existing Check covers all requirements from Google.
- Existing Check covers some part of requirements from Google.
- Requirements are not possible to check by Checkstyle at all.
ATTENTION: Links to config and sample files in the following table reference to latest (not released yet) config. Config might be slightly different from what we have in the latest release. Please always use config that is embedded to jar or use a custom version copied from one that matches your checkstyle version.
Sample files consists of files that show what code is correct and what is not. The incorrect code is marked with a "violation" comment and a message explaining the incorrect code. All the sections have their own sample files that contain example code for the particular section. Please keep in mind that some section's sample files might contain false positive violations; such sections are marked with a blue tick, showing that Checkstyle does not fully cover that section.
To adjust the default severity level for violations using Checkstyle's Google style configuration, set the following system property:
org.checkstyle.google.severity
For detailed guidance on severity levels, refer to the
Severity Level.
To configure this property, see the instructions for the
CLI's -p
option , or use the
properties
parameter in Ant,
or set the Java system property before running Checkstyle.
It is possible to suppress some violations by embeded filters SuppressionFilter, SuppressionXpathFilter, SuppressWithNearbyCommentFilter, SuppressionCommentFilter, SuppressWarningsFilter and SuppressWithNearbyTextFilter.
Location of config file for SuppressionFilter can be defined by system property org.checkstyle.google.suppressionfilter.config (default value is checkstyle-suppressions.xml).
Location of config file for SuppressionXpathFilter can be defined by system property org.checkstyle.google.suppressionxpathfilter.config (default value is checkstyle-xpath-suppressions.xml).
To suppress a check in the next line of code using SuppressWithNearbyCommentFilterprecede the line of code with // CHECKSTYLE.SUPPRESS: NameOfTheCheck (replace NameOfTheCheck with the actual check to be suppressed).
To suppress a check on a block of code using SuppressionCommentFilter add // CHECKSTYLE.OFF: NameOfTheCheck before the beginning of the code block and // CHECKSTYLE.ON: NameOfTheCheck after the end of the code block (replace NameOfTheCheck with the actual check to be suppressed).
To suppress a check using SuppressWarningsFilter use Java's@SuppressWarnings({"checkstyle:name_of_the_check", ...}) annotation. Each value passed in the array parameter must meet the format checkstyle:name_of_the_check where the checkstyle: is optional and name_of_the_check is the actual name of check to be suppressed in lowercase format.
To suppress a check for few lines below or above, use
SuppressWithNearbyTextFilter
suppression, use
// CHECKSTYLE.SUPPRESS: NameOfCheck for ([+-]\d+) lines
comment.
( replace NameOfCheck with the check you want to suppress.
For suppressing a check few lines below,
replace ([+-]\d+) with +NumberOfLines where NumberOfLines
is number of the lines below from the comment's line number,
for suppressing a check few lines above, use "-" instead of "+". )
For more details please review exact configuration of Filters in google_checks.xml: SuppressionFilter, SuppressionXpathFilter SuppressWithNearbyCommentFilter, SuppressionCommentFilter, SuppressWarningsFilter, SuppressWithNearbyTextFilter