Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I easily fix Checkstyle errors?

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

like image 932
ivotron Avatar asked Dec 07 '11 00:12

ivotron


People also ask

How do I fix checkstyle violation in IntelliJ?

Go to Settings|Editor|Code Style, choose a code style you want to import CheckStyle configuration to. Click on the gear, then 'import scheme', choose "CheckStyle Configuration" and select a corresponding CheckStyle configuration file. Click OK.

How do I check my checkstyle violations?

To view to violation report, go to Window -> Show View -> Other, and search for Checkstyle. Options for Violations and Violations Chart should be displayed.

How do I remove checkstyle plugin from eclipse?

In latest eclipse version(9/2014) we have to visit Help -> Eclipse Market and go to installed tab. Then select uninstall. After uninstallation this will ask for a eclipse restart.


1 Answers

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

like image 138
Freedom_Ben Avatar answered Oct 04 '22 15:10

Freedom_Ben