diff --git a/build.gradle b/build.gradle index 92c206ab97..7d99c9b71d 100644 --- a/build.gradle +++ b/build.gradle @@ -64,6 +64,7 @@ configure(allprojects) { project -> apply plugin: "test-source-set-dependencies" apply plugin: "io.spring.dependency-management" apply from: "${gradleScriptDir}/ide.gradle" + apply plugin: "checkstyle" dependencyManagement { resolutionStrategy { @@ -75,6 +76,11 @@ configure(allprojects) { project -> } } + checkstyle { + toolVersion = "8.10.1" + configDir = rootProject.file("src/checkstyle") + } + apply plugin: "kotlin" compileKotlin { kotlinOptions { @@ -163,9 +169,10 @@ configure(allprojects) { project -> testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}") testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}") testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}") - // JSR-305 only used for non-required meta-annotations + // JSR-305 only used for non-required meta-annotations compileOnly("com.google.code.findbugs:jsr305:3.0.2") testCompileOnly("com.google.code.findbugs:jsr305:3.0.2") + checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.5") } ext.javadocLinks = [ diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 0000000000..963710de13 --- /dev/null +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml new file mode 100644 index 0000000000..d69c423368 --- /dev/null +++ b/src/checkstyle/checkstyle.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +