How do I resolve checkstyle issues efficiently!

Checkstyle is a static code analysis tool used in software development for checking if Java source code complies with coding rules.

Checkstyle is important since it is an automated tool that is used to enforce a consistent style. It makes the Code have more quality.

You can solve the checkstyle issues by:

  1. Navigate to the CRIO directory in your workspace, right click on the CrioEditorStyle.xml file
    WhatsApp Image 2020-06-08 at 20.01.08

  2. Choose the Set The Checkstyle Configuration File option
    WhatsApp Image 2020-06-08 at 19.59.17

  3. Go to a particular file where the checkstyle issue were generated.

  4. Press right-click and choose Format Document

Now, you have to organize your imports as well.

For Lexicographical errors present in the particular file.

  1. Press ctrl+shift+P on your keyboard.
    Screenshot_83
  2. Search and select the option Organize imports, or you can also use the shortcut (shift+alt+O)