When the checkstyle plugin is used in a multiproject, it should know to search in the parent project’s config/checkstyle/{checkstyle,suppressions}.xml. Currently, gradle check
in a subproject errors with a message about missing configuration.
As a workaround, users can do something like this in the parent build.gradle
:
allprojects {
apply plugin: 'checkstyle'
checkstyle {
configFile = "${rootProject.projectDir}/config/checkstyle/checkstyle.xml" as File
configProperties = [configDir: "${rootProject.projectDir}/config"]
}
}
But it would be nice if the checkstyle plugin simply behaved like this out of the box.