diff --git a/.ci/validation.sh b/.ci/validation.sh
index df1e027c2b5b..0263edfff3fb 100755
--- a/.ci/validation.sh
+++ b/.ci/validation.sh
@@ -1365,30 +1365,26 @@ spotless)
./mvnw -e --no-transfer-progress clean spotless:check -P spotless-autofix
;;
-openrewrite-recipes)
- echo "Cloning and building OpenRewrite recipes..."
- PROJECT_ROOT="$(pwd)"
+sanity-check)
export MAVEN_OPTS="-Xmx4g -Xms2g"
-
+ echo "Sanity Check ๐ฆข"
+ echo "Cloning and building OpenRewrite recipes ๐ฅ"
cd /tmp
git clone https://github.com/checkstyle/checkstyle-openrewrite-recipes.git
cd checkstyle-openrewrite-recipes
mvn -e --no-transfer-progress clean install -DskipTests
-
- cd "$PROJECT_ROOT"
-
- echo "Running Checkstyle validation to get report for openrewrite..."
+ cd "$(pwd)"
+ echo "Run Checkstyle validation to get report for openrewrite โ๏ธ"
set +e
./mvnw -e --no-transfer-progress clean compile antrun:run@ant-phase-verify
set -e
- echo "Running OpenRewrite recipes..."
+ echo "Run OpenRewrite recipes โ๏ธ"
./mvnw -e --no-transfer-progress -Drewrite.recipeChangeLogLevel=INFO \
rewrite:run -P checkstyle-autofix
-
- echo "Checking for uncommitted changes..."
+ echo "Checking for uncommitted changes ๐"
./.ci/print-diff-as-patch.sh target/rewrite.patch
-
rm -rf /tmp/checkstyle-openrewrite-recipes
+ echo "Complete โ๏ธ"
;;
*)
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 598c7da5459d..4c1a70c48cad 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,15 +1,13 @@
-version: 2.1
-
+name: "CI โป๏ธ"
+version: "2.1"
jobs:
-
run-inspections:
docker:
- - image: amitkumardeoghoria/idea-image:jdk21-idea2022.3.3-v1
-
+ - image: "amitkumardeoghoria/idea-image:jdk21-idea2022.3.3-v1"
steps:
- checkout
- run:
- name: Print versions
+ name: "Print Versions ๐"
command: |
echo "Maven version:"
./mvnw --version
@@ -18,57 +16,58 @@ jobs:
echo "IDEA version:"
echo $IDEA_VERSION
- run:
- name: Run inspections
+ name: "Run Inspections ๐"
command: |
mkdir .idea
cp config/intellij-idea-inspections-misc.xml .idea/misc.xml
./.ci/idea-inspection.sh
- no_output_timeout: 25m
- working_directory: ~/project
+ no_output_timeout: "25m"
+ working_directory: "~/project"
- store_artifacts:
- path: /home/circleci/project/target/inspection-results
-
+ name: "Store Artifacts ๐ฆ"
+ path: "/home/circleci/project/target/inspection-results"
validate-with-maven-script:
description: "Runs a maven script using the job name as the argument."
parameters: &script_parameters
image-name:
- type: string
+ type: "string"
default: "cimg/openjdk:21.0.6"
description: "docker image to use"
command:
description: "command to run"
- type: string
+ type: "string"
default: ""
docker:
- - image: << parameters.image-name >>
+ - image: "<< parameters.image-name >>"
steps:
- checkout
- restore_cache:
- name: Restore Maven repo and wrapper cache
+ name: "Restore Cache ๐"
keys:
- - mvn-cache-{{ checksum "pom.xml" }}
+ - "mvn-cache-{{ checksum \"pom.xml\" }}"
- run:
- command: << parameters.command >>
+ name: "Execute Command โก"
+ command: "<< parameters.command >>"
- run:
+ name: "Run Validation Scripts โ
"
command: |
./.ci/validation.sh git-diff
./.ci/validation.sh ci-temp-check
- save_cache:
- name: Save Maven repo and wrapper cache
- key: mvn-cache-{{ checksum "pom.xml" }}
+ name: "Save Cache ๐พ"
+ key: "mvn-cache-{{ checksum \"pom.xml\" }}"
paths:
- - .m2
- - .mvn/wrapper
-
+ - ".m2"
+ - ".mvn/wrapper"
validate-with-script:
description: "Runs a non-maven script using the job name as the argument."
parameters: *script_parameters
docker:
- - image: << parameters.image-name >>
+ - image: "<< parameters.image-name >>"
steps:
- checkout
- run:
- name: run << parameters.command >>
+ name: "Run Validation Script ๐ ๏ธ"
command: |
sudo apt update
sudo apt install -y xmlstarlet --no-install-recommends apt-utils
@@ -76,262 +75,238 @@ jobs:
export PR_HEAD_SHA=$CIRCLE_SHA1
export PR_NUMBER=$CIRCLE_PR_NUMBER
<< parameters.command >>
-
sonarqube:
docker:
- - image: amitkumardeoghoria/jdk-21-groovy-git-mvn-ant-jq:v1
-
+ - image: "amitkumardeoghoria/jdk-21-groovy-git-mvn-ant-jq:v1"
steps:
- checkout
- run:
- name: Run sonarqube
+ name: "Run SonarQube ๐"
command: |
export PR_NUMBER=$CIRCLE_PR_NUMBER
export PR_BRANCH_NAME=$CIRCLE_BRANCH
export SONAR_API_TOKEN=$SONAR_TOKEN
./.ci/validation.sh sonarqube
-
yamllint:
docker:
- - image: cimg/base:2022.11
-
+ - image: "cimg/base:2022.11"
steps:
- checkout
- run:
- name: Install dependencies
+ name: "Install Dependencies ๐ฅ"
command: |
sudo apt update
sudo apt install -y yamllint
- run:
- name: Run yamllint
- command: yamllint -f parsable -c config/yamllint.yaml .
-
+ name: "Run YAML Lint ๐"
+ command: "yamllint -f parsable -c config/yamllint.yaml ."
workflows:
- # sonarqube:
- # jobs:
- # - sonarqube:
- # context:
- # - sonarqube
-
test:
jobs:
- # no-exception-test script
- validate-with-maven-script:
- name: "no-exception-lucene-and-others-javadoc"
+ name: "No Exception Lucene Javadoc ๐"
image-name: &cs_img "amitkumardeoghoria/jdk-21-groovy-git-mvn-ant-jq:v1"
command: "./.ci/no-exception-test.sh no-exception-lucene-and-others-javadoc"
- validate-with-maven-script:
- name: "no-exception-cassandra-storm-tapestry-javadoc"
+ name: "No Exception Cassandra Javadoc ๐"
image-name: *cs_img
command: "./.ci/no-exception-test.sh no-exception-cassandra-storm-tapestry-javadoc"
- validate-with-maven-script:
- name: "no-exception-hadoop-apache-groovy-scouter-javadoc"
+ name: "No Exception Hadoop Javadoc ๐"
image-name: *cs_img
command: "./.ci/no-exception-test.sh no-exception-hadoop-apache-groovy-scouter-javadoc"
- validate-with-maven-script:
- name: "no-exception-only-javadoc"
+ name: "No Exception Only Javadoc ๐"
image-name: *cs_img
command: "./.ci/no-exception-test.sh no-exception-only-javadoc"
-
- # validation script
- validate-with-maven-script:
- name: "no-error-xwiki"
+ name: "No Error XWiki โ
"
image-name: "cimg/openjdk:21.0.6"
command: "./.ci/validation.sh no-error-xwiki"
- validate-with-maven-script:
- name: "no-error-pmd"
+ name: "No Error PMD โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-error-pmd"
- validate-with-maven-script:
- name: "no-exception-struts"
+ name: "No Exception Struts โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-struts"
- validate-with-maven-script:
- name: "no-exception-checkstyle-sevntu"
+ name: "No Exception Checkstyle โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-checkstyle-sevntu"
- validate-with-maven-script:
- name: "no-exception-checkstyle-sevntu-javadoc"
+ name: "No Exception Checkstyle Javadoc ๐"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-checkstyle-sevntu-javadoc"
- validate-with-maven-script:
- name: "no-exception-guava"
+ name: "No Exception Guava โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-guava"
- validate-with-maven-script:
- name: "no-exception-hibernate-orm"
+ name: "No Exception Hibernate โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-hibernate-orm"
- validate-with-maven-script:
- name: "no-exception-spotbugs"
+ name: "No Exception SpotBugs โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-spotbugs"
- validate-with-maven-script:
- name: "no-exception-spoon"
+ name: "No Exception Spoon โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-spoon"
- validate-with-maven-script:
- name: "no-exception-spring-framework"
+ name: "No Exception Spring โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-spring-framework"
- validate-with-maven-script:
- name: "no-exception-hbase"
+ name: "No Exception HBase โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-hbase"
- validate-with-maven-script:
- name: "no-exception-Pmd-elasticsearch-lombok-ast"
+ name: "No Exception PMD ElasticSearch โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-Pmd-elasticsearch-lombok-ast"
- validate-with-maven-script:
- name: "no-exception-alot-of-projects"
+ name: "No Exception Many Projects โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-exception-alot-of-projects"
- validate-with-maven-script:
- name: "no-warning-imports-guava"
+ name: "No Warning Imports Guava โ ๏ธ"
image-name: *cs_img
command: "./.ci/validation.sh no-warning-imports-guava"
- validate-with-maven-script:
- name: "no-warning-imports-java-design-patterns"
+ name: "No Warning Imports Design Patterns โ ๏ธ"
image-name: *cs_img
command: "./.ci/validation.sh no-warning-imports-java-design-patterns"
- validate-with-maven-script:
- name: "checkstyle-and-sevntu"
+ name: "Checkstyle and Sevntu โ
"
image-name: *cs_img
command: "./.ci/validation.sh checkstyle-and-sevntu"
- # https://github.com/spotbugs/spotbugs-maven-plugin/issues/806 explains
- # why we need execution of spotbugs without any other maven plugins which can change binaries
- validate-with-maven-script:
- name: "spotbugs-and-pmd"
+ name: "SpotBugs and PMD โ
"
image-name: *cs_img
command: "./.ci/validation.sh spotbugs-and-pmd"
- validate-with-maven-script:
- name: "site"
+ name: "Site Generation ๐"
image-name: *cs_img
command: "./.ci/validation.sh site"
- validate-with-maven-script:
- name: "release-dry-run"
+ name: "Release Dry Run ๐"
image-name: *cs_img
command: "./.ci/validation.sh release-dry-run"
- validate-with-maven-script:
- name: "assembly-run-all-jar"
+ name: "Assembly Run All JAR ๐ฆ"
image-name: *cs_img
command: "./.ci/validation.sh assembly-run-all-jar"
- validate-with-maven-script:
- name: "no-error-test-sbe"
+ name: "No Error Test SBE โ
"
image-name: "cimg/openjdk:21.0.6"
command: "./.ci/validation.sh no-error-test-sbe"
- validate-with-maven-script:
- name: "no-error-spotbugs"
+ name: "No Error SpotBugs โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-error-spotbugs"
- validate-with-maven-script:
- name: "no-error-pgjdbc"
+ name: "No Error PGJDBC โ
"
image-name: "cimg/openjdk:21.0"
command: "./.ci/validation.sh no-error-pgjdbc"
- validate-with-maven-script:
- name: "linkcheck-plugin"
+ name: "Link Check Plugin ๐"
image-name: "cimg/openjdk:21.0.6"
command: "./.ci/run-link-check-plugin.sh --skip-external"
- validate-with-maven-script:
- name: "no-exception-samples-gradle"
+ name: "No Exception Gradle Samples โ
"
image-name: "cimg/openjdk:17.0.7"
command: "./.ci/no-exception-test.sh no-exception-samples-gradle"
- validate-with-maven-script:
- name: "no-exception-samples-maven"
+ name: "No Exception Maven Samples โ
"
image-name: "cimg/openjdk:21.0.6"
command: "./.ci/no-exception-test.sh no-exception-samples-maven"
-
- validate-with-maven-script:
- name: "no-exception-samples-ant"
+ name: "No Exception Ant Samples โ
"
image-name: *cs_img
command: "./.ci/no-exception-test.sh no-exception-samples-ant"
- validate-with-maven-script:
- name: "no-error-hazelcast"
+ name: "No Error Hazelcast โ
"
image-name: *cs_img
command: "./.ci/validation.sh no-error-hazelcast"
-
idea:
jobs:
- run-inspections
-
git-validation:
jobs:
- validate-with-script:
- name: "git-no-merge-commits"
+ name: "Git No Merge Commits ๐ซ"
command: "./.ci/validation.sh git-no-merge-commits"
- validate-with-script:
- name: "git-check-pull-number"
+ name: "Git Check Pull Number ๐ข"
command: "./.ci/validation.sh git-check-pull-number"
-
cli-validation:
jobs:
- yamllint
- validate-with-script:
- name: "checkchmod"
+ name: "Check CHMOD Permissions ๐"
command: "./.ci/checkchmod.sh"
- validate-with-script:
- name: "check-github-workflows-concurrency"
+ name: "Check GitHub Workflows Concurrency ๐"
command: "./.ci/validation.sh check-github-workflows-concurrency"
- validate-with-script:
- name: "check-wildcards-on-pitest-target-classes"
+ name: "Check Wildcards on Pitest ๐ฏ"
image-name: "cimg/base:2022.11"
command: "./.ci/validation.sh check-wildcards-on-pitest-target-classes"
-
javac-validation:
jobs:
- validate-with-script:
- name: "check-since-version"
+ name: "Check Since Version ๐"
command: "./.ci/validation.sh check-since-version"
- validate-with-script:
- name: "javac17_standard"
+ name: "JavaC 17 Standard ๐ข"
image-name: "cimg/openjdk:17.0.7"
command: "./.ci/validation.sh javac17_standard"
- validate-with-script:
- name: "javac17"
+ name: "JavaC 17 ๐ข"
image-name: "cimg/openjdk:17.0.7"
command: "./.ci/validation.sh javac17"
- validate-with-script:
- name: "java 21 test resources compile"
+ name: "Java 21 Test Resources Compile ๐งช"
image-name: "cimg/openjdk:21.0.8"
command: "./.ci/validation.sh compile-test-resources"
- validate-with-script:
- name: "javac19"
+ name: "JavaC 19 ๐ข"
image-name: "cimg/openjdk:19.0.1"
command: "./.ci/validation.sh javac19"
- validate-with-script:
- name: "javac20"
+ name: "JavaC 20 ๐ข"
image-name: "cimg/openjdk:20.0.1"
command: "./.ci/validation.sh javac20"
- validate-with-script:
- name: "javac21"
+ name: "JavaC 21 ๐ข"
image-name: "cimg/openjdk:21.0.6"
command: "./.ci/validation.sh javac21"
- validate-with-script:
- name: "javac22"
+ name: "JavaC 22 ๐ข"
image-name: "cimg/openjdk:22.0.2"
command: "./.ci/validation.sh javac22"
- validate-with-script:
- name: "javac25"
+ name: "JavaC 25 ๐ข"
image-name: "cimg/openjdk:25.0"
command: "./.ci/validation.sh javac25"
-
site-validation:
jobs:
- validate-with-maven-script:
- name: "jdk21-package-site"
+ name: "JDK 21 Package Site ๐ฆ"
image-name: *cs_img
command: "./.ci/validation.sh package-site"
-
- openrewrite:
+ rewrite:
jobs:
- validate-with-maven-script:
- name: "openrewrite-recipes"
+ name: "Sanity Check ๐ฆข"
image-name: "cimg/openjdk:21.0"
- command: "./.ci/validation.sh openrewrite-recipes"
-
+ command: "./.ci/validation.sh sanity-check"
spotless:
jobs:
- validate-with-maven-script:
- name: spotless
+ name: "Spotless โจ"
image-name: "cimg/openjdk:21.0"
command: "./.ci/validation.sh spotless"
diff --git a/pom.xml b/pom.xml
index 91ad63779c9f..854d35f8022d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5455,7 +5455,7 @@
true
true
- org.checkstyle.AllAutoFixes
+ org.checkstyle.openrewrite.SanityCheck
**.ci-temp**
diff --git a/rewrite.yml b/rewrite.yml
index 8139c1e90626..394b6a726ead 100644
--- a/rewrite.yml
+++ b/rewrite.yml
@@ -1,6 +1,6 @@
---
type: specs.openrewrite.org/v1beta/recipe
-name: org.checkstyle.AllAutoFixes
+name: org.checkstyle.openrewrite.SanityCheck
displayName: Auto Fixes
description: List of auto fixes from different providers.
recipeList: