Skip to content

Checkstyle

Ryan Andriamahery edited this page Feb 16, 2022 · 3 revisions

Checking warnings and errors

This project uses a custom version of Google Checkstyle, available in : config/checkstyle.

You need to configure your preferred IDEA to use it, so you can check warnings and errors in your codes.

Fixing warnings and errors

As our custom checkstyle doesn't fix automatically warnings and errors, you should configure manually your preferred IDEA to make it conform to our coding style. In our case, we use IntelliJ IDEA, so these are the parameters to change, seen in Settings > Editor > Code Style > Java

  1. In Tabs and Idents
  • Tab size = 2
  • Indent = 2
  1. In Imports
  • Use single class import = ✅
  • Class count to use import "*" = 99
  • Static class count to use import "*" = 99
  1. In Wrapping and braces
  • Hard wrap at = 100 (Line length <= 100 characters)
Clone this wiki locally