-
Notifications
You must be signed in to change notification settings - Fork 14
Suppress checkstyle in xml #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have a project set up working as follows: File locations:
checkstyle.xml: ...
<module name="SuppressionFilter">
<property
name="file"
value="gnag-configs/checkstyle-suppressions.xml" />
</module>
... checkstyle-suppressions.xml: <?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress checks=".*" files="[\\/]test[\\/]" />
</suppressions> Based on this, I'd advise you to try the following suppression filter in your project: <module name = "Checker">
<module name="SuppressionFilter">
<property name="file" value="checkstyle-suppressions.xml"/>
</module>
</module> or maybe (depending on your project relationships) <module name = "Checker">
<module name="SuppressionFilter">
<property name="file" value="../checkstyle-suppressions.xml"/>
</module>
</module> Let us know if either of those options work for you :) |
This part works ...
<module name="SuppressionFilter">
<property
name="file"
value="gnag-configs/checkstyle-suppressions.xml" />
</module>
... I think for some reason it points to the root directory. |
Not currently, and I don't think there are plans to support this either. Glad we were able to get this working for you though! |
Uh oh!
There was an error while loading. Please reload this page.
Background
for suppressing checkstyle via xml we have to add
SupressionFilter
Issue
checkstyle is not able to locate that file and I end up getting this exception
I tried many different things in
value
param even if the rule and the suppression file were in same location it's still unable to locate it.From this issue it looks like the checkstyle plugin itself requires some param to set.
Something like this
Question
Is there some other way to suppress it??
basically i want to suppress certain path.
Example - Everything under test should be suppressed
The text was updated successfully, but these errors were encountered: