Merge pull request #441 from whym/master

Add PMD settings
This commit is contained in:
Josephine Lim 2017-03-18 23:24:55 +10:00 committed by GitHub
commit 79cd48cc2d
2 changed files with 38 additions and 2 deletions

View file

@ -1,6 +1,7 @@
apply plugin: 'checkstyle'
apply plugin: 'pmd'
check.dependsOn 'checkstyle'
check.dependsOn 'checkstyle', 'pmd'
checkstyle {
toolVersion = '7.5.1'
@ -17,7 +18,28 @@ task checkstyle(type: Checkstyle) {
reports {
html {
enabled true
destination "$project.buildDir/reports/checkstyle/checkstyle.html"
destination "${project.buildDir}/reports/checkstyle/checkstyle.html"
}
}
}
task pmd(type: Pmd) {
ignoreFailures = true
ruleSetFiles = files("${project.rootDir}/ruleset.xml")
ruleSets = []
source 'src'
include '**/*.java'
exclude '**/gen/**'
reports {
xml.enabled = false
html.enabled = true
xml {
destination "${project.buildDir}/reports/pmd/pmd.xml"
}
html {
destination "${project.buildDir}/reports/pmd/pmd.html"
}
}
}