I'm trying to switch from the default checkstyle configuration, sun-checks, to google-checks.
In my jenkinsfile, I'm writing:
stage('checkstyle') {
steps {
sh "mvn clean checkstyle:checkstyle -Dcheckstyle.config.location='https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml'"
checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: 'target/checkstyle-result.xml', unHealthy: ''
}
}
This is failing with the error message
Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle (default-cli) on project pmm: An error has occurred in Checkstyle report generation.: Failed during checkstyle execution: Failed during checkstyle configuration: unable to parse configuration stream - Element type "html" must be declared.:8:17 -> [Help 1]
How can I change the checkstyle configuration for Jenkins?