diff --git a/.github/renovate-tracked-deps.json b/.github/renovate-tracked-deps.json index 513b437c6..292f6b0d8 100644 --- a/.github/renovate-tracked-deps.json +++ b/.github/renovate-tracked-deps.json @@ -163,6 +163,7 @@ "aqua:jonwiggins/xmloxide", "aqua:owenlamont/ryl", "biome", + "checkstyle", "editorconfig-checker", "google-java-format", "hugo", diff --git a/AGENTS.md b/AGENTS.md index 9c229117a..2949d8089 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ mise run ci # Quick compile without tests or checks (fastest) mise run compile -# Run unit tests only (skips formatting/coverage/checkstyle) +# Run unit tests only (skips formatting and coverage) mise run test # Run all tests including integration tests @@ -23,15 +23,15 @@ mise run test-all # Run a single test class ./mvnw test -Dtest=CounterTest \ - -Dcoverage.skip=true -Dcheckstyle.skip=true + -Dcoverage.skip=true # Run a single test method ./mvnw test -Dtest=CounterTest#testIncrement \ - -Dcoverage.skip=true -Dcheckstyle.skip=true + -Dcoverage.skip=true # Run tests in a specific module ./mvnw test -pl prometheus-metrics-core \ - -Dcoverage.skip=true -Dcheckstyle.skip=true + -Dcoverage.skip=true # Regenerate protobuf classes (after protobuf dep update) mise run generate diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ece7e11e5..1b42bfaf4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,14 +96,12 @@ mise --cd .mise/envs/native run native-test ### Avoid failures while running tests - Use `-Dcoverage.skip=true` to skip the coverage check during development. -- Use `-Dcheckstyle.skip=true` to skip the checkstyle check during development. - Use `-Dwarnings=-nowarn` to skip the warnings during development. Combine all with ```shell -./mvnw install -DskipTests -Dcoverage.skip=true \ - -Dcheckstyle.skip=true -Dwarnings=-nowarn +./mvnw install -DskipTests -Dcoverage.skip=true -Dwarnings=-nowarn ``` or simply diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index 82e964658..b1b9d6cfe 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -21,4 +21,12 @@ + + + + + + + diff --git a/checkstyle.xml b/checkstyle.xml index cac6be8d3..bc6375b3f 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -48,18 +48,6 @@ - - - - - - - - diff --git a/mise.lock b/mise.lock index 7a22f9cdb..05d82afa6 100644 --- a/mise.lock +++ b/mise.lock @@ -302,6 +302,45 @@ url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.5 url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/509899229" provenance = "github-attestations" +[[tools.checkstyle]] +version = "13.8.0" +backend = "aqua:checkstyle/checkstyle" + +[tools.checkstyle."platforms.linux-arm64"] +checksum = "sha256:cb0b1083eb5d3f9f0b7f0edd9a86d8dbe406bf44da73c3df869abace8cb8502c" +url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-13.8.0/checkstyle-13.8.0-all.jar" +url_api = "https://api.github.com/repos/checkstyle/checkstyle/releases/assets/474019260" + +[tools.checkstyle."platforms.linux-arm64-musl"] +checksum = "sha256:cb0b1083eb5d3f9f0b7f0edd9a86d8dbe406bf44da73c3df869abace8cb8502c" +url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-13.8.0/checkstyle-13.8.0-all.jar" +url_api = "https://api.github.com/repos/checkstyle/checkstyle/releases/assets/474019260" + +[tools.checkstyle."platforms.linux-x64"] +checksum = "sha256:cb0b1083eb5d3f9f0b7f0edd9a86d8dbe406bf44da73c3df869abace8cb8502c" +url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-13.8.0/checkstyle-13.8.0-all.jar" +url_api = "https://api.github.com/repos/checkstyle/checkstyle/releases/assets/474019260" + +[tools.checkstyle."platforms.linux-x64-musl"] +checksum = "sha256:cb0b1083eb5d3f9f0b7f0edd9a86d8dbe406bf44da73c3df869abace8cb8502c" +url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-13.8.0/checkstyle-13.8.0-all.jar" +url_api = "https://api.github.com/repos/checkstyle/checkstyle/releases/assets/474019260" + +[tools.checkstyle."platforms.macos-arm64"] +checksum = "sha256:cb0b1083eb5d3f9f0b7f0edd9a86d8dbe406bf44da73c3df869abace8cb8502c" +url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-13.8.0/checkstyle-13.8.0-all.jar" +url_api = "https://api.github.com/repos/checkstyle/checkstyle/releases/assets/474019260" + +[tools.checkstyle."platforms.macos-x64"] +checksum = "sha256:cb0b1083eb5d3f9f0b7f0edd9a86d8dbe406bf44da73c3df869abace8cb8502c" +url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-13.8.0/checkstyle-13.8.0-all.jar" +url_api = "https://api.github.com/repos/checkstyle/checkstyle/releases/assets/474019260" + +[tools.checkstyle."platforms.windows-x64"] +checksum = "sha256:cb0b1083eb5d3f9f0b7f0edd9a86d8dbe406bf44da73c3df869abace8cb8502c" +url = "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-13.8.0/checkstyle-13.8.0-all.jar" +url_api = "https://api.github.com/repos/checkstyle/checkstyle/releases/assets/474019260" + [[tools.editorconfig-checker]] version = "3.11.1" backend = "aqua:editorconfig-checker/editorconfig-checker" diff --git a/mise.toml b/mise.toml index 021e0921c..a94b1f061 100644 --- a/mise.toml +++ b/mise.toml @@ -12,6 +12,7 @@ actionlint = "1.7.12" "aqua:jonwiggins/xmloxide" = "v0.5.0" "aqua:owenlamont/ryl" = "0.21.0" biome = "2.5.8" +checkstyle = "13.8.0" editorconfig-checker = "3.11.1" google-java-format = "1.36.1" lychee = "0.24.2" @@ -48,16 +49,16 @@ run = "./mvnw clean" [tasks.compile] description = "bare compile, ignoring formatting and linters" -run = "./mvnw install -DskipTests -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn" +run = "./mvnw install -DskipTests -Dcoverage.skip=true -Dwarnings=-nowarn" [tasks.generate] description = "regenerate protobuf sources" -run = "./mvnw clean install -DskipTests -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn" +run = "./mvnw clean install -DskipTests -Dcoverage.skip=true -Dwarnings=-nowarn" env.PROTO_GENERATION = "true" [tasks.test] description = "run unit tests, ignoring formatting and linters" -run = "./mvnw test -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn" +run = "./mvnw test -Dcoverage.skip=true -Dwarnings=-nowarn" [tasks.test-all] description = "run all tests" @@ -78,7 +79,6 @@ BASELINE_OVERRIDE="${API_DIFF_BASELINE_VERSION:+-Dapi.diff.baseline.version=${AP ${BASELINE_OVERRIDE} \ -DskipTests \ -Dcoverage.skip=true \ - -Dcheckstyle.skip=true \ -Dwarnings=-nowarn ./.github/scripts/sync-api-diffs.sh """ diff --git a/pom.xml b/pom.xml index 2ba361bb1..f1adf649e 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,6 @@ 1.8.0 0.70 - false false false -Werror @@ -182,28 +181,6 @@ - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - true - google_checks.xml - checkstyle.xml - warning - true - ${checkstyle.skip} - checkstyle-suppressions.xml - **/generated/**,**/jmh_generated/* - - - - - check - - - - org.jacoco jacoco-maven-plugin diff --git a/prometheus-metrics-otel-support/pom.xml b/prometheus-metrics-otel-support/pom.xml index a4d179114..0365c4695 100644 --- a/prometheus-metrics-otel-support/pom.xml +++ b/prometheus-metrics-otel-support/pom.xml @@ -19,7 +19,6 @@ - true true true diff --git a/prometheus-metrics-parent/pom.xml b/prometheus-metrics-parent/pom.xml index d84511964..94467188d 100644 --- a/prometheus-metrics-parent/pom.xml +++ b/prometheus-metrics-parent/pom.xml @@ -14,7 +14,6 @@ - true true true