diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 08880826bc..32b4f5dc24 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -11,7 +11,7 @@ on: - '!sql-jdbc/**' - '**gradle*' - '**lombok*' - - '**checkstyle*' + - '**spotless*' - 'integ-test/**' - '**/*.jar' - '**/*.pom' diff --git a/DEVELOPER_GUIDE.rst b/DEVELOPER_GUIDE.rst index 5b27288204..c4fd6cc2d6 100644 --- a/DEVELOPER_GUIDE.rst +++ b/DEVELOPER_GUIDE.rst @@ -127,7 +127,7 @@ The plugin codebase is in standard layout of Gradle project:: ├── THIRD-PARTY ├── build.gradle ├── config - │ └── checkstyle + │ └── spotless ├── docs │   ├── attributions.md │   ├── category.json @@ -170,7 +170,7 @@ Here are sub-folders (Gradle modules) for plugin source code: Here are other files and sub-folders that you are likely to touch: - ``build.gradle``: Gradle build script. -- ``config``: only Checkstyle configuration files for now. +- ``config``: only Spotless configuration files for now. - ``docs``: documentation for developers and reference manual for users. - ``doc-test``: code that run .rst docs in ``docs`` folder by Python doctest library. @@ -230,9 +230,7 @@ Most of the time you just need to run ./gradlew build which will make sure you p * - ./gradlew generateGrammarSource - (Re-)Generate ANTLR parser from grammar file. * - ./gradlew compileJava - - Compile all Java source files. - * - ./gradlew checkstyle - - Run all checks according to Checkstyle configuration. + - Compile all Java source files. * - ./gradlew test - Run all unit tests. * - ./gradlew :integ-test:integTest diff --git a/build.gradle b/build.gradle index 0586dbe2df..14ea5b67f9 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,6 @@ buildscript { plugins { id 'nebula.ospackage' version "8.3.0" id 'java-library' - id 'checkstyle' id "io.freefair.lombok" version "6.4.0" id 'jacoco' id 'com.diffplug.spotless' version '6.19.0' @@ -184,23 +183,6 @@ jacocoTestCoverageVerification { } check.dependsOn jacocoTestCoverageVerification -// TODO: fix code style in main and test source code -allprojects { - apply plugin: 'checkstyle' - checkstyle { - configFile rootProject.file("config/checkstyle/google_checks.xml") - toolVersion "10.3.2" - configProperties = [ - "org.checkstyle.google.suppressionfilter.config": rootProject.file("config/checkstyle/suppressions.xml")] - ignoreFailures = false - } -} -checkstyle { - configFile file("config/checkstyle/checkstyle.xml") -} -checkstyleMain.ignoreFailures = false -checkstyleTest.ignoreFailures = true - configurations.all { resolutionStrategy.force 'junit:junit:4.13.2' exclude group: "commons-logging", module: "commons-logging" diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml deleted file mode 100644 index 3d0e8f074d..0000000000 --- a/config/checkstyle/checkstyle.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/checkstyle/google_checks.xml b/config/checkstyle/google_checks.xml deleted file mode 100644 index 12c90f8495..0000000000 --- a/config/checkstyle/google_checks.xml +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml deleted file mode 100644 index ff366c9457..0000000000 --- a/config/checkstyle/suppressions.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/core/build.gradle b/core/build.gradle index 2eea59459a..0df41c8dd7 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -33,14 +33,6 @@ repositories { mavenCentral() } -// Being ignored as a temporary measure before being removed in favour of -// spotless https://github.com/opensearch-project/sql/issues/1101 -checkstyleTest.ignoreFailures = true -checkstyleMain.ignoreFailures = true -checkstyleTestFixtures.ignoreFailures = true - - - dependencies { api group: 'com.google.guava', name: 'guava', version: '32.0.1-jre' api group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' diff --git a/integ-test/build.gradle b/integ-test/build.gradle index c716bccb3d..3244d6e31b 100644 --- a/integ-test/build.gradle +++ b/integ-test/build.gradle @@ -101,7 +101,6 @@ dependencies { dependencyLicenses.enabled = false testingConventions.enabled = false -checkstyleTest.ignoreFailures = true forbiddenApisTest.enabled = false thirdPartyAudit.enabled = false