There is an option now.
checkstyle-IDEA since 4.24.0 features import of checkstyle config.
Please install CheckStyle-IDEA plugin (http://plugins.jetbrains.com/plugin/1065?pr=idea), it can be found via plug-in repository (Settings|Plugins|Browse repositories). 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. At the end you will see a message "CheckStyle configuration settings were imported to ... scheme".
If you encounter any problems, you can create a new issue for the CheckStyle plug-in here: https://github.com/jshiell/checkstyle-idea/issues. This issue is actually a duplicate of https://github.com/jshiell/checkstyle-idea/issues/126.
CheckStyle plug-in version where the feature is available is 4.24.0
Copied from https://youtrack.jetbrains.com/issue/IDEA-61520#comment=27-1292600. Copied the answer from here
Edit: Quote has been changed for clarity and to meet the current UI design.
Answer from Ajay Yadav on Stack OverflowThere is an option now.
checkstyle-IDEA since 4.24.0 features import of checkstyle config.
Please install CheckStyle-IDEA plugin (http://plugins.jetbrains.com/plugin/1065?pr=idea), it can be found via plug-in repository (Settings|Plugins|Browse repositories). 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. At the end you will see a message "CheckStyle configuration settings were imported to ... scheme".
If you encounter any problems, you can create a new issue for the CheckStyle plug-in here: https://github.com/jshiell/checkstyle-idea/issues. This issue is actually a duplicate of https://github.com/jshiell/checkstyle-idea/issues/126.
CheckStyle plug-in version where the feature is available is 4.24.0
Copied from https://youtrack.jetbrains.com/issue/IDEA-61520#comment=27-1292600. Copied the answer from here
Edit: Quote has been changed for clarity and to meet the current UI design.
import your code style config first

reformat your code.
intellij idea - Intelij auto fix gradlew checkstyle errors like formatting? - Stack Overflow
java - How can I easily fix Checkstyle errors? - Stack Overflow
CheckStyle plugin for IDEA - java way of warnings presentation and automatic fixes? - Stack Overflow
Add API to fix violations automatically
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're using Eclipse, yes. You can't correct all problems though. There are two ways:
- Right click on the java file in Package Explorer or whatever, and select 'Apply Checkstyle Corrections'.
- Click on the error in the problems view, and select 'Quick fix'. This corrects the problem.
I really do not understand the need for checkstyle. Imagine your build fails because you have an extra white space that you can't even see through naked eye. Java allows mulitple blank lines and as much white space as you want for a reason to have flexibility. I know it is possible for somoene to add accidently add 100s of blank new line but that is something no developer would ever do intentionally





