TheAlgorithms/Java

[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:

(@siriak, @BamaCharanChhandogi feel free to edit the list above)

Additional information

How to contribute

  1. select one check form the list above such that no one else is working on (and is not done yet),
  2. write a comment "Hey, I am working on XYZ", where XYZ is your select check,
  3. in your fork, please create a branch like enable_XYZ,
  4. uncomment the XYZ check in the checkstyle.xml,
  5. run mvn checkstyle:check and fix all of the errors - please keep your changes minimal,
  6. commit your changes with a message like "style: enable XYZ in checkstyle",
  7. 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.

vil02 commented

I will work on RedundantModifier.

vil02 commented

I will slowly work on AvoidStarImport.

Hey, I will be working on MethodName

vil02 commented

I will work on ArrayTypeStyle.

vil02 commented

I will work on HideUtilityClassConstructor.

vil02 commented

@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.