-
Notifications
You must be signed in to change notification settings - Fork 10
Tech manuals
-
Go to
Settings -> Tools -> Checkstyle
. Click on"+" (Add) Configuration File -> Use a local Checkstyle file -> Browse
-> and choose configuration file in the root of the project -checkstyle.xml
. Also add a description for this Checkstyle file, e.g. "TeachUA". -
Go to
Settings -> Editor -> Code Style -> Java -> Choose Scheme : Default-> Settings -> Restore Defaults -> Duplicate -> Set the name(e.g TeachUA) -> Settings -> Import Scheme -> Checkstyle configuration ->
and choose configuration file in the root of project -checkstyle.xml
. -
If you did everything right you can use hotkeys as Ctrl + Alt + L - for Formatting code, and Ctrl + Alt + O - for Optimizing imports.
-
Set running Checkstyle before building the project Go to
Edit Configurations... -> Application -> Menu on bottom of settings("Before launch") -> "+" (Add task) -> "Run Maven Goal" -> Comand line : checkstyle:check
. -
Also if you just want to check the project you can use the command:
mvn checkstyle:check
-
IMPORTANT! Always before creating PR check the project with Checkstyle.
Happy coding!