mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Also update Checkstyle to 8.38. Google changed their style guide from the last time we imported it. This PR brings in those naming changes. The change they made is allowing single letter member, parameter, and local variable names. They also added a lambda naming scheme and I thought it would be good to bring that in too.
26 lines
628 B
Groovy
26 lines
628 B
Groovy
|
|
apply plugin: 'checkstyle'
|
|
|
|
checkstyle {
|
|
toolVersion = "8.38"
|
|
configDirectory = file("${project.rootDir}/styleguide")
|
|
config = resources.text.fromFile(new File(configDirectory.get().getAsFile(), "checkstyle.xml"))
|
|
}
|
|
|
|
if (!project.hasProperty('skipPMD')) {
|
|
apply plugin: 'pmd'
|
|
|
|
pmd {
|
|
toolVersion = '6.7.0'
|
|
consoleOutput = true
|
|
reportsDir = file("$project.buildDir/reports/pmd")
|
|
ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml"))
|
|
ruleSets = []
|
|
}
|
|
}
|
|
|
|
task javaFormat {
|
|
dependsOn(tasks.withType(Checkstyle))
|
|
dependsOn(tasks.withType(Pmd))
|
|
}
|