[OTHER] Enable more checks in checkstyle
vil02 opened this issue ยท 27 comments
What would you like to share?
#5110 introduced checkstyle. The config file has some of the rules commented out. It might a good idea to introduce some of them and discuss why the other ones are not needed in this repository.
List of checks which should be introduced
Few of the obvious checks, which should be introduced:
- ConstantName (#5139 by @marysiuniq)
- LocalFinalVariableName
- LocalVariableName
- MemberName
- MethodName
- ParameterName
- StaticVariableName
- TypeName
- AvoidStarImport (#5141)
- ModifierOrder (#5132 by @marysiuniq)
- RedundantModifier (#5140)
- EmptyStatement (#5120)
- MultipleVariableDeclarations
- HideUtilityClassConstructor (#5147)
- ArrayTypeStyle (#5145)
- InvalidJavadocPosition
- OperatorWrap
- ParenPad
- EqualsHashCode (#5157 by @CodaBlurd)
- InnerAssignment (#5162 by @CodaBlurd)
- FinalClass (#5154 by @CodaBlurd)
(@siriak, @BamaCharanChhandogi feel free to edit the list above)
Additional information
How to contribute
- select one check form the list above such that no one else is working on (and is not done yet),
- write a comment "Hey, I am working on
XYZ
", whereXYZ
is your select check, - in your fork, please create a branch like enable_XYZ,
- uncomment the
XYZ
check in thecheckstyle.xml
, - run
mvn checkstyle:check
and fix all of the errors - please keep your changes minimal, - commit your changes with a message like "style: enable
XYZ
in checkstyle", - create a pull-request and mention this issue by writing something like "Related to #5119".
I will work on EmptyStatement
.
Hey, I will be working on ModifierOrder
.
Now, I will be working on ConstantName
.
I will work on RedundantModifier
.
I will slowly work on AvoidStarImport
.
Hey, I will be working on MethodName
I will work on ArrayTypeStyle
.
I will work on HideUtilityClassConstructor
.
@siriak, @BamaCharanChhandogi I have extended the list of obvious checks. Please have a look and edit the list if needed.
Hi, I will be working on FinalClass.
I will work on EqualsHashCode.
I will work on InnerAssignment.