Skip to content

Instantly share code, notes, and snippets.

@arthurfnsc
Created April 20, 2017 03:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arthurfnsc/f108ffe5d4f08f15ccc168f627579940 to your computer and use it in GitHub Desktop.
Save arthurfnsc/f108ffe5d4f08f15ccc168f627579940 to your computer and use it in GitHub Desktop.
build.gradle
apply plugin: "checkstyle"
checkstyle {
configFile = project(':').file("config/checkstyle/checkstyle.xml")
configProperties = ["suppressionFile" : project(':').file("config/checkstyle/suppressions.xml")]
toolVersion = "6.0"
}
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
}
}
checkstyle.xml
<module name="SuppressionFilter">
<property name="file" value="${suppressionFile}"/>
</module>
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 files="[/\\]build[/\\]" checks="[a-zA-Z0-9]*"/>
</suppressions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment