I have one file which contains rules for the project.
I want my unit tests methods to be allowed to have underscore in their names.
Like myMethod_should_call_someClass_someMehod
. Currently I have one configuration, which is applied to all files in the project.
My question is it possible to somehow configure checkstyle, so, for example I specify specific rules for all files that are ending with *Test.java
.
Currently the only solution I found is to provide SuppressionFilter
and exclude all files ending with *Test.java
. But is there a way I could provide a different MethodNameCheck
module with different format for test files?