How can I easily fix Checkstyle errors?

ivotron picture ivotron · Dec 7, 2011 · Viewed 48k times · Source

Is there a way to have an IDE fix Checkstyle errors automatically without having to fix each manually?

Answer

Freedom_Ben picture Freedom_Ben · Sep 8, 2017

If you are using IntelliJ, you can install the CheckStyle IDEA plugin.

Then import the CheckStyle settings into the editor, and Reformat like normal (Ctrl+Alt+L is default shortcut key).