Closed
Description
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 (style: enable
ConstantName
in checkstyle #5139 by @marysiuniq) - LocalFinalVariableName (Enabled LocalFinalVariableName in Checkstyle #5172 by @CodaBlurd)
- LocalVariableName (style: enable
LocalVariableName
in CheckStyle #5191 by @cpu-pixel) - MemberName (style: enable
MemberName
in checkstyle #5193 by @cpu-pixel) - MethodName (style: enable
MethodName
in CheckStyle #5182 by @CodaBlurd) - ParameterName (style: enable
ParameterName
in CheckStyle. #5196 by @CodaBlurd) - StaticVariableName (style: enable
StaticVariableName
in checkstyle #5173 by @vaibhav9t1) - TypeName (style: enable
TypeName
#5214 by @StarDxxx) - AvoidStarImport (style: enable
AvoidStarImport
in checkstyle #5141) - ModifierOrder (style: enable
ModifierOrder
in checkstyle #5132 by @marysiuniq) - RedundantModifier (style: enable
RedundantModifier
in checkstyle #5140) - EmptyStatement (style: enable
EmptyStatement
#5120) - MultipleVariableDeclarations (style: enable
MultipleVariableDeclarations
in checkstyle #5175 by @vaibhav9t1) - HideUtilityClassConstructor (style: enable
HideUtilityClassConstructor
in checkstyle #5147) - ArrayTypeStyle (style: enable
ArrayTypeStyle
in checkstyle #5145) - InvalidJavadocPosition (style: enable
InvalidJavadocPosition
in checkstyle #5237 by @samuelfac) - OperatorWrap (style: enable
OperatorWrap
in checkstyle #5212 by @StarDxxx) - ParenPad (style: enable
ParenPad
in checkstyle #5226 by @samuelfac) - EqualsHashCode (style: enable EqualsHashCode in checkstyle #5157 by @CodaBlurd)
- InnerAssignment (style: enabled
InnerAssignment
in checkstyle #5162 by @CodaBlurd) - FinalClass (style: enable
FinalClass
in checkstyle #5154 by @CodaBlurd) - MissingSwitchDefault (style: enable
MissingSwitchDefault
in checkstyle #5179 by @BamaCharanChhandogi) - NeedBraces (style: enable
NeedBraces
in checkstyle #5227 by @samuelfac) - AvoidNestedBlocks (style: enable
AvoidNestedBlocks
in checkstyle #5228 by @samuelfac) - WhitespaceAround (style: enable
WhitespaceAround
in checktyle #5241) - TodoComment (style: enable
TodoComment
in checkstyle #5785 by @nishchalgv1)
(@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 selected 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 [OTHER] Enable more checks in checkstyle #5119".