Hi,

Checkstyle has a SuppressionFilter. You need to define a XML file with suppression rules.

config/checkstyle/checkstyle.xml

<module name="SuppressionFilter">
<property name="file" value="config/checkstyle/suppressions.xml"/>
</module>

It works with a single project, but it fails with a multi project.

I tried two solutions but they had the same problem. The check fails if it is started from the subproject.
The path for the suppression.xml is wrong.

1. one checkstyle.xml for all projects
build.gradle (checkstyleConfigFileName = "../config/checkstyle/checkstyle.xml")
setting.gradle (include "A", "B")
config/checkstyle/checkstyle.xml (SuppressionFilter: "config/checkstyle/suppressions.xml")
config/checkstyle/suppressions.xml
A/src/...
B/src/...

2. every project has its own checkstyle.xml (default as described at the UserGuide)
build.gradle
setting.gradle (include "A", "B")
A/src/...
A/config/checkstyle/checkstyle.xml (SuppressionFilter: "A/config/checkstyle/suppressions.xml")
A/config/checkstyle/suppressions.xml
B/src/...
B/config/checkstyle/checkstyle.xml (SuppressionFilter: "B/config/checkstyle/suppressions.xml")
B/config/checkstyle/suppressions.xml

I think that both solutions should work. Is it possible to inject the path from gradle?

regards,
Mathias Kalb


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to