OpenJDK's Java Style Checkstyle Coverage

Useful information

This coverage report was created for OpenJDK Java Style (cached page), Draft v6, December 2015.

The OpenJDK style guide says that, apart from LF, the only allowed whitespace character is Space, and that \', \", \\, \t, \b, \r, \f, and \n should be preferred over corresponding octal or Unicode escaped characters.

Incomplete Checkstyle configuration for 'OpenJDK Java Style'

Legend

"???" - Report is incomplete in this line.
"--" - There is no rule in this paragraph.
"↓" - This paragraph is the high-level point of some group.
- Existing Check covers all requirements from OpenJDK.
- Existing Check covers some part of requirements from OpenJDK.
- Requirements are not possible to check by Checkstyle at all.

Coverage table

ATTENTION: Links to config and test in following table reference to latest (not released yet) config. Config might be slightly different from what we have in latest release. Please always use config that is embedded to jar or use a custom version copied from one that matches your checkstyle version.

OpenJDK's Java Style Rule Checkstyle Check Applied to config
Introduction --
Motivation --
Guiding Principles --
Java Source Files charset=US-ASCII, LineEnding ( config)

RegexpSingleline ( config)

OuterTypeFilename ( config)
samples
Special Characters IllegalTokenText ( config), AvoidEscapedUnicodeCharacters ( config) samples
Formatting OneTopLevelClass ( config) samples
Copyright notice ???
Package declaration NoLineWrap ( config) samples
Import statements ImportOrder ( config)

NoLineWrap ( config)

UnusedImports ( config)
samples
Wildcard Imports AvoidStarImport ( config) samples
Class Structure DeclarationOrder ( config)

Factory Method is not covered by DeclarationOrder. Checkstyle is a static tool it can not determine the difference between normal and factory methods and also the relation between fields can not be determined.

Ordering of nested types can not be covered until #19636
samples
Order of Constructors and Overloaded Methods OverloadMethodsDeclarationOrder ( config)

ConstructorsDeclarationGrouping ( config)
samples
Modifiers RedundantModifier ( config)

Modifiers order can not be covered until: #19513

Checkstyle can not determine whether a final modifier increases the readability of method parameters and local variables and also we can not find is there any compelling reason present for a field which is declared as final.
samples
Braces LeftCurly ( config)

RightCurly ( config)

NeedBraces ( config)

Closing braces rule can not be covered until: #7541

False positive present regarding to LeftCurly: #20636
samples
Short Forms LeftCurly ( config)

This section can not be covered until: #7541
samples
Indentation FileTabCharacter ( config)

Indentation ( config)
samples
Wrapping Lines OneStatementPerLine ( config) samples
Wrapping Class Declarations This section can not be covered until: #20595
Wrapping Method Declarations Parameter alignment rule can not be covered until: #20638

Throws clause alignment rule can not be covered until: #20639
Wrapping Expressions OperatorWrap ( config)
False positive is present for lambda expression: #20541
SeparatorWrap ( config)

We can not distinguish whether a line breaks into multiple statements or expressions or the line is simply wrapped.
samples
Whitespace
Vertical Whitespace EmptyLineSeparator ( config) samples
Horizontal Whitespace WhitespaceAround ( config)
WhitespaceAfter ( config)
NoWhitespaceBefore ( config)
NoWhitespaceBeforeCaseDefaultColon ( config)
ParenPad ( config)
TypecastParenPad ( config)
MatchXpath ( config)
SingleSpaceSeparator ( config)
samples
Variable Declarations MultipleVariableDeclarations ( config)

ArrayTypeStyle ( config)

VariableDeclarationUsageDistance ( config)
samples
Annotations This section can not be covered until: #20209
Lambda Expressions LambdaBodyLength ( config) samples
Redundant Parentheses MatchXpath ( config)

Note: Automated enforcement of this rule is not supported, as determining whether redundant parentheses improve code readability requires human context and subjective judgment.
samples
Literals UpperEll ( config)

HexLiteralCase ( config)

NumericalPrefixesInfixesSuffixesCharacterCase ( config)
samples
Javadoc SummaryJavadoc ( config)
JavadocContentLocation ( config)
Inline tag rule can not be covered until: #18570
Paragraph tag rule can not be covered until: #20628
samples
Naming
Package Names

Note: Detection of plural forms or semantic word variations is not supported, as there is no valid method to do it.

PackageName (config)
samples
Class, Interface and Enum Names TypeName ( config)

AbbreviationAsWordInName ( config)

Checkstyle is a Static analysis tool. It lacks the linguistic dictionary and contextual awareness required to identify grammatical parts of speech like nouns or adjectives. Consequently, it cannot evaluate word meanings to judge whether an abbreviation is widely understood or if a term is being used correctly.
samples
Method Names MethodName ( config)
Method names should typically be verbs or other descriptions of actions. This cannot be fully covered because Checkstyle does not have English vocabulary to determine whether a method name is a verb or action description.
samples
Variables MemberName ( config)
StaticVariableName ( config)
LocalVariableName ( config)
LocalFinalVariableName ( config)
ParameterName ( config)
LambdaParameterName ( config)
PatternVariableName ( config)
RecordComponentName ( config)
CatchParameterName ( config)
samples
Type Variables ClassTypeParameterName ( config)
InterfaceTypeParameterName ( config)
MethodTypeParameterName ( config)
RecordTypeParameterName ( config)
Checkstyle is a Static analysis tool. It lacks the linguistic dictionary and contextual awareness required to identify that a given word is descriptive or not also it can not determine that a given case is complex or simple.
samples
Constants ConstantName ( config)

IllegalIdentifierName ( config)

These checks partially covers the rule for constants because these can not determine whether two words are separated by underscore (_) or not.
samples
Programming Practices MissingOverrideOnRecordAccessor ( config)
Only checks missing override for explicitly declared record accessor methods.

MissingOverride ( config)
Only checks for missing override when @inheritDoc javadoc tag is present.

MethodLength ( config)

FallThrough ( config)

MatchXpath ( config)

ParameterAssignment ( config)

TodoComment ( config)

Some rules cannot be covered due to limitations of checkstyle like checkstyle cannot determine whether code is dead or not or all non-obvious pre and post conditions are documented or not or a static field/method is called using class identifiers and not variable identifiers.
samples
Commenting Code --
When to reformat code --
Cases not covered --

Suppressions

It is possible to suppress some violations by embedded filters SuppressionFilter and SuppressionXpathFilter. Location of config file for SuppressionFilter can be defined by system property org.checkstyle.openjdk.suppressionfilter.config (default value is checkstyle-suppressions.xml). Location of config file for SuppressionXpathFilter can be defined by system property org.checkstyle.openjdk.suppressionxpathfilter.config (default value is checkstyle-xpath-suppressions.xml).

For more details please review exact configuration of Filters in openjdk_checks.xml: SuppressionFilter, SuppressionXpathFilter.