Intellij IDEA checkstyle
84,477
Solution 1
Go to the Checkstyle configuration page via File → Settings, then typing checkstyle
into the search box:
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:
Solution 2
In the new version you need to install a plugin called CheckStyle-IDEA
Author by
Maxim Gotovchits
I'm a CS student of MIPT. I study combinatorics, number theory, algebra, maths logic, group theory, C/C++, Java etc.
Updated on July 09, 2022Comments
-
Maxim Gotovchits almost 2 years
I've got a problem trying to import my check-style to IDEA 14. That's what I do:
- File -> Settings -> Inspections -> Import
- There I choose my checkstyle.xml and then I don't know why but TempProfile is created.
- Hmm, ok, looks like this TempProfile can check my code using my checkstyle.xml but it doesn't!
-
Maxim Gotovchits over 9 yearsOh no! Unfortunately I don't have "checkstyle" in "Other Setting". There's Vim Emulation only =(
-
Flowryn almost 8 years@MaximGotovchits which plugin? I am also interested in solving this issue
-
syr almost 8 yearsHad installed Version 4.5.2 that I used and configured in Idea 14 one year ago. Now there is no "checkstyle" in "Other Setting" although the plugin is installed. Already did a reinstall and "Invalidate Caches / Restart" but checkstyle doesn't show up. Any suggestions?
-
Nick Div about 7 years@ThomasJensen Could you please elaborate how to enable the real-time scan. And thanks for the steps to import checkstyle.xml Would something that works in eclipse work the same way in IntelliJ?
-
barfuin about 7 years@NickDiv Added screenshot for inspections.
-
Islam Azab about 6 yearsIs there a way to make "code reformatting" follow this "checkstyle" too?
-
JSON derulo about 3 yearsAfter installing checkstyle as plugin you first need to click "Apply" or "OK" before you can find it. (took me now 10 min to find it, I even restarted IntelliJ, but only after I clicked "Apply" it really got installed.
-
Catalin Florea about 3 years@GrgKro good thing I saw your comment, I was dealing with the same issue
-
Vivek Agrawal about 2 yearscan somebody also let us know how to configure the suppressions.xml if its defined as variable in checkstyle.xml
-
sendon1982 about 2 yearsI think if checkstyle version matches with xml file version, you did not need config anything.