Intellij IDEA checkstyle

Maxim Gotovchits picture Maxim Gotovchits · Nov 16, 2014 · Viewed 63.7k times · Source

I've got a problem trying to import my check-style to IDEA 14. That's what I do:

  1. File -> Settings -> Inspections -> Import
  2. There I choose my checkstyle.xml and then I don't know why but TempProfile is created.
  3. Hmm, ok, looks like this TempProfile can check my code using my checkstyle.xml but it doesn't!

Answer

barfuin picture barfuin · Nov 16, 2014

Go to the Checkstyle configuration page via File → Settings, then typing checkstyle into the search box:

IntelliJ config editor

Press the plus icon to add your checkstyle.xml. Activate your checkstyle.xml by clicking the checkbox in the column labeled Active.

That's it!
If you want real-time scans, you can go to the Inspections dialog and activate the real-time scan:

IntelliJ Inspections Dialog