I've got a scalastyle_config.xml file with the following check, among others:
<check class="org.scalastyle.scalariform.ClassNamesChecker" level="warning" enabled="false">
<parameters>
<parameter name="regex"><![CDATA[^[A-Z][A-Za-z]*$]]></parameter>
</parameters>
</check>
I want this to be applied to all files, except for two:
-FooK3.java
-FooK3Something.java
Is there any way to add an exception for those files? Can't see anything in the documentation
I don't know any way to exclude specific files from that checker, and I've been using
scalastylefor a while, so I assume there isn't such a way at the moment.What can be done, is turning off
scalastyleexactly where you don't want it. And then it will work on the rest of the file. For example where you defineClass FooK3, you can do either:Or:
Then the check will pass. A good practice is the add to the comment the name of the rule you want to bypass, such that if one day someone fixes it,
scalastylewill be returned.Official docs can be found here.