-
Notifications
You must be signed in to change notification settings - Fork 149
How to use SevNTU Checkstyle in Intellij IDEA
Roman Ivanov edited this page Apr 4, 2020
·
9 revisions
###Table of Contents###
- Install CheckStyle-IDEA
- Download configuration file for CheckStyle-IDEA
- Config CheckStyle-IDEA
- Config Inspections
- Run CheckStyle-IDEA
###Install CheckStyle-IDEA###
- Open IDE Settings: file>Settings>IDE Settings>plugins.

- Click "Browse repositories".

- Search "Checkstyle-idea".

- Choose plugin and click "Download and install".

- Wait for downloading and installing.

- Reboot IDEA.
###Download configuration file for CheckStyle-IDEA###
-
Download latest sevntu-checkstyle-idea-extension-X.XX.X.jar from our maven repo , github repository.
-
Download sevntu-checks.xml with all SevNTU checks with configuration settings this we use in our project ( use it only as example and adjust to your requirements)
###Config CheckStyle-IDEA###
- Open Config CheckStyle-IDEA Settings: file>Settings>IDE Settings>CheckStyle

- Add Third-Party checks.

- Add Configuration file. Add description and choose Configuration file.

Click "Next" and check that validation is ok.

- Click "Apply" and "Ok".
###Config Inspections###
- Open: Analyze > Inspect Code...

- In Inspection region, click on 'change inspections' button.

- Click "add" and make your inspections profile.

- Choose all required inspections what you need.

- Click "Apply" and "ok".
###Run CheckStyle-IDEA###
- Open Analyze>Inspect code...

- Choose inspection scope and inspection profile and than click "ok".

-
For inspection current file open necessary file in file editor.
-
Open Analyze>Inspect code... and choose "Current file".

- As result you should have something like this:
