Parent issue: #19604
Description
Add Checkstyle checks for all rules under §3.7 - Indentation of the OpenJDK Java Style Guidelines v6.
Rules covered
From §3.7 - Indentation:
- Indentation level is four spaces -
Indentation Check
- Only space characters may be used for indentation. No tabs -
FileTabCharacter Check
- Empty lines must not be indented. (This is implied by the no trailing white space rule.) - covered by
RegexpSingleline in §2
- case lines should be indented with four spaces, and statements within the case should be indented with another four spaces -
Indentation Check
- Refer to Section Wrapping Lines for guidelines on how to indent continuation lines -
Indentation Check
Checks to add to openjdk_checks.xml
Checker-level (non-TreeWalker):
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
TreeWalker-level:
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="caseIndent" value="4"/>
<property name="throwsIndent" value="8"/>
<property name="lineWrappingIndentation" value="8"/>
<property name="arrayInitIndent" value="4"/>
</module>
Progress tracker
| Check |
Rule |
PR |
FileTabCharacter |
No tabs, only spaces |
|
Indentation |
Four-space indentation, case indent, continuation lines |
|
Parent issue: #19604
Description
Add Checkstyle checks for all rules under §3.7 - Indentation of the OpenJDK Java Style Guidelines v6.
Rules covered
From §3.7 - Indentation:
Indentation CheckFileTabCharacter CheckRegexpSinglelinein §2Indentation CheckIndentation CheckChecks to add to
openjdk_checks.xmlChecker-level (non-TreeWalker):
TreeWalker-level:
Progress tracker
FileTabCharacterIndentation