Last active
July 26, 2024 22:37
Gradle checkstyle with suppression filter module
This file contains hidden or 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 hidden or 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: