Last active
July 26, 2024 22:37
-
-
Save soucekv/a962f788ceb70e418e2f to your computer and use it in GitHub Desktop.
Gradle checkstyle with suppression filter module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Gist note this is snippet from root build.gradle in project with subprojects | |
checkstyle { | |
// use one common config file for all subprojects | |
configFile = project(':').file('config/checkstyle/checkstyle.xml') | |
configProperties = [ "suppressionFile" : project(':').file('config/checkstyle/suppressions.xml')] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<module name="SuppressionFilter"> | |
<property name="file" value="${suppressionFile}"/> | |
</module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was so clutch, thanks so much!
I also added a default value so that I could use the same XML file from IntelliJ's checkstyle plugin: