Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij IDEA checkstyle

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!
like image 392
Maxim Gotovchits Avatar asked Nov 16 '14 10:11

Maxim Gotovchits


Video Answer


2 Answers

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

like image 175
barfuin Avatar answered Sep 20 '22 07:09

barfuin


In the new version you need to install a plugin called CheckStyle-IDEA

enter image description here

enter image description here

like image 21
sendon1982 Avatar answered Sep 23 '22 07:09

sendon1982