Is there a way to have an IDE fix Checkstyle errors automatically without having to fix each manually?
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.
To view to violation report, go to Window -> Show View -> Other, and search for Checkstyle. Options for Violations and Violations Chart should be displayed.
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With