diff --git a/build.gradle b/build.gradle index 801c4909f..027f448a1 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ plugins { // Apply the application plugin to add support for building a CLI application in Java. id 'application' id 'com.github.spotbugs' version '6.0.4' apply false + id 'checkstyle' } // Global checkstyle file @@ -51,6 +52,13 @@ def gitHash = { -> return stdout.toString().trim() } +tasks.withType(Checkstyle) { + reports { + xml.required = false + html.required = true + } +} + project.ext["jarVersion"] = "${projectVersion}.${buildTime}.${gitHash}" project.ext["packageVersion"] = "${projectVersion}.${buildTime}.${gitHash}.el8" diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 000000000..9ac204f27 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/config/checkstyle/sun_checks.xml b/config/checkstyle/sun_checks.xml index 61d5ad0c9..758e36d35 100644 --- a/config/checkstyle/sun_checks.xml +++ b/config/checkstyle/sun_checks.xml @@ -1,77 +1,94 @@ + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> - + + + --> + + + + + + + + + + + - + + - - + - - - - + + - + - + - + - + + + + - + - + - - - - + + + + - + @@ -79,25 +96,17 @@ - - - - - - - - - - - - - + + + + + - + - + @@ -108,29 +117,22 @@ - - + - - + + + - - - - + - - - - - + - + @@ -142,48 +144,42 @@ - - + - - + - - - + - - - + - + - + + - - + diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml new file mode 100644 index 000000000..e69de29bb diff --git a/settings.gradle b/settings.gradle index f691999a8..5246ea013 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,6 +12,7 @@ dependencyResolutionManagement { libs { version('springboot', '3.0.1') version('jackson', '2.14.2') + library('checkstyle', 'com.puppycrawl.tools:checkstyle:10.12.7') library('commons-codec', 'commons-codec:commons-codec:1.15') library('commons_io', 'commons-io:commons-io:2.11.0') library('commons-lang3', 'org.apache.commons:commons-lang3:3.13.0')