Skip to content

How to use SevNTU Checkstyle in Intellij IDEA

Roman Ivanov edited this page Apr 4, 2020 · 9 revisions

###Table of Contents###

###Install CheckStyle-IDEA###

  1. Open IDE Settings: file>Settings>IDE Settings>plugins.

  1. Click "Browse repositories".

  1. Search "Checkstyle-idea".

  1. Choose plugin and click "Download and install".

  1. Wait for downloading and installing.

  1. Reboot IDEA.

###Download configuration file for CheckStyle-IDEA###

  1. Download latest sevntu-checkstyle-idea-extension-X.XX.X.jar from our maven repo , github repository.

  2. 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###

  1. Open Config CheckStyle-IDEA Settings: file>Settings>IDE Settings>CheckStyle

  1. Add Third-Party checks.

  1. Add Configuration file. Add description and choose Configuration file.

Click "Next" and check that validation is ok.

  1. Click "Apply" and "Ok".

###Config Inspections###

  1. Open: Analyze > Inspect Code...

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

  1. Click "add" and make your inspections profile.

  1. Choose all required inspections what you need.

  1. Click "Apply" and "ok".

###Run CheckStyle-IDEA###

  1. Open Analyze>Inspect code...

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

  1. For inspection current file open necessary file in file editor.

  2. Open Analyze>Inspect code... and choose "Current file".

  1. As result you should have something like this: