Checkstyle does not check unit test classes

When I run Checkstyle on the whole project, it will run on all other classes than the classes with unit tests.

Also, when I go to the CheckStyle-View, the run button is green and works on usual classes (opened in the editor), while it is greyed out on test classes.

I am using a checkstyle-configuration in an xml-file, that I have used and maintained in Eclipse before I switched to IntelliJ just now.

评论操作 固定链接

Oh, I just found the location of this setting with some help! Totally failed to see it before.

It is under File > Settings > Checkstyle > "Scan Scope" in the top right corner of the window > choose "Only Java sources (including tests)".