From 141bd1345fa29b21f29cbe603f04e079b96ea745 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Fri, 24 Jul 2026 12:57:08 +0000 Subject: [PATCH 1/3] ci: validate unreleased Flint Checkstyle support Signed-off-by: Gregor Zeitlinger --- .github/renovate-tracked-deps.json | 3 +- checkstyle-suppressions.xml | 8 ++++++ mise.lock | 46 ++++++++++++++++++++++++++++++ mise.toml | 3 +- 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/.github/renovate-tracked-deps.json b/.github/renovate-tracked-deps.json index 513b437c6..d138ca7b9 100644 --- a/.github/renovate-tracked-deps.json +++ b/.github/renovate-tracked-deps.json @@ -157,13 +157,14 @@ "mise.toml": { "mise": [ "actionlint", - "aqua:grafana/flint", "aqua:grafana/gcx", "aqua:grafana/oats", "aqua:jonwiggins/xmloxide", "aqua:owenlamont/ryl", "biome", + "cargo:https://github.com/grafana/flint", "editorconfig-checker", + "github:checkstyle/checkstyle", "google-java-format", "hugo", "java", diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index 82e964658..976903e13 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -21,4 +21,12 @@ + + + + + + + diff --git a/mise.lock b/mise.lock index fb15a188d..c3c6775d0 100644 --- a/mise.lock +++ b/mise.lock @@ -296,6 +296,10 @@ url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.5 url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/470058831" provenance = "github-attestations" +[[tools."cargo:https://github.com/grafana/flint"]] +version = "rev:3619bdc" +backend = "cargo:https://github.com/grafana/flint" + [[tools.editorconfig-checker]] version = "3.8.0" backend = "aqua:editorconfig-checker/editorconfig-checker" @@ -335,6 +339,48 @@ checksum = "sha256:7ec31e1a6a9983aa2a4942cb66dfd35e8b61e76263460413988438ae14269 url = "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v3.8.0/ec-windows-amd64.zip" url_api = "https://api.github.com/repos/editorconfig-checker/editorconfig-checker/releases/assets/460248513" +[[tools."github:checkstyle/checkstyle"]] +version = "checkstyle-13.8.0" +backend = "github:checkstyle/checkstyle" + +[tools."github:checkstyle/checkstyle".options] +matching = "all.jar" + +[tools."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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.google-java-format]] version = "1.35.0" backend = "aqua:google/google-java-format" diff --git a/mise.toml b/mise.toml index a9dbac2bc..74594a4f9 100644 --- a/mise.toml +++ b/mise.toml @@ -8,11 +8,12 @@ protoc = "35.1" # Linters actionlint = "1.7.12" -"aqua:grafana/flint" = "0.22.7" "aqua:jonwiggins/xmloxide" = "v0.4.3" "aqua:owenlamont/ryl" = "0.21.0" biome = "2.5.3" +"cargo:https://github.com/grafana/flint" = "rev:3619bdc" editorconfig-checker = "3.8.0" +"github:checkstyle/checkstyle[matching=all.jar,rename_exe=checkstyle]" = "checkstyle-13.8.0" google-java-format = "1.35.0" lychee = "0.24.2" "npm:renovate" = "43.257.4" From 4d5392409ef08091b36f14e5bebd7166b936c092 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Fri, 24 Jul 2026 13:38:06 +0000 Subject: [PATCH 2/3] ci: replace Maven Checkstyle with Flint Signed-off-by: Gregor Zeitlinger --- .github/renovate-tracked-deps.json | 2 +- AGENTS.md | 8 +-- CONTRIBUTING.md | 4 +- checkstyle-suppressions.xml | 4 +- mise.lock | 83 ++++++++++++------------- mise.toml | 11 ++-- pom.xml | 23 ------- prometheus-metrics-otel-support/pom.xml | 1 - prometheus-metrics-parent/pom.xml | 1 - 9 files changed, 53 insertions(+), 84 deletions(-) diff --git a/.github/renovate-tracked-deps.json b/.github/renovate-tracked-deps.json index d138ca7b9..18ab66cb3 100644 --- a/.github/renovate-tracked-deps.json +++ b/.github/renovate-tracked-deps.json @@ -157,6 +157,7 @@ "mise.toml": { "mise": [ "actionlint", + "aqua:checkstyle/checkstyle", "aqua:grafana/gcx", "aqua:grafana/oats", "aqua:jonwiggins/xmloxide", @@ -164,7 +165,6 @@ "biome", "cargo:https://github.com/grafana/flint", "editorconfig-checker", - "github:checkstyle/checkstyle", "google-java-format", "hugo", "java", diff --git a/AGENTS.md b/AGENTS.md index 24481b8e5..e776815c1 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 519b98fea..a3ea0ef3a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,14 +89,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 976903e13..b1b9d6cfe 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -22,8 +22,8 @@ - + diff --git a/mise.lock b/mise.lock index c3c6775d0..fa1e61730 100644 --- a/mise.lock +++ b/mise.lock @@ -46,6 +46,45 @@ url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_ url_api = "https://api.github.com/repos/rhysd/actionlint/releases/assets/384924919" provenance = "github-attestations" +[[tools."aqua:checkstyle/checkstyle"]] +version = "checkstyle-13.8.0" +backend = "aqua:checkstyle/checkstyle" + +[tools."aqua:checkstyle/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."aqua:checkstyle/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."aqua:checkstyle/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."aqua:checkstyle/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."aqua:checkstyle/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."aqua:checkstyle/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."aqua:checkstyle/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."aqua:grafana/flint"]] version = "0.22.7" backend = "aqua:grafana/flint" @@ -297,7 +336,7 @@ url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/470058831" provenance = "github-attestations" [[tools."cargo:https://github.com/grafana/flint"]] -version = "rev:3619bdc" +version = "rev:3f8aa74" backend = "cargo:https://github.com/grafana/flint" [[tools.editorconfig-checker]] @@ -339,48 +378,6 @@ checksum = "sha256:7ec31e1a6a9983aa2a4942cb66dfd35e8b61e76263460413988438ae14269 url = "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v3.8.0/ec-windows-amd64.zip" url_api = "https://api.github.com/repos/editorconfig-checker/editorconfig-checker/releases/assets/460248513" -[[tools."github:checkstyle/checkstyle"]] -version = "checkstyle-13.8.0" -backend = "github:checkstyle/checkstyle" - -[tools."github:checkstyle/checkstyle".options] -matching = "all.jar" - -[tools."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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."github:checkstyle/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.google-java-format]] version = "1.35.0" backend = "aqua:google/google-java-format" diff --git a/mise.toml b/mise.toml index 74594a4f9..a2f327301 100644 --- a/mise.toml +++ b/mise.toml @@ -8,12 +8,12 @@ protoc = "35.1" # Linters actionlint = "1.7.12" +"aqua:checkstyle/checkstyle" = "checkstyle-13.8.0" "aqua:jonwiggins/xmloxide" = "v0.4.3" "aqua:owenlamont/ryl" = "0.21.0" biome = "2.5.3" -"cargo:https://github.com/grafana/flint" = "rev:3619bdc" +"cargo:https://github.com/grafana/flint" = "rev:3f8aa74" editorconfig-checker = "3.8.0" -"github:checkstyle/checkstyle[matching=all.jar,rename_exe=checkstyle]" = "checkstyle-13.8.0" google-java-format = "1.35.0" lychee = "0.24.2" "npm:renovate" = "43.257.4" @@ -47,16 +47,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" @@ -77,7 +77,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 d03c6cd6c..e0cfda23d 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 From 5a0cbf1b68f2b1619c123c94e72d4d93aeb16b66 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Fri, 24 Jul 2026 14:17:45 +0000 Subject: [PATCH 3/3] ci: refresh unreleased Flint Checkstyle pin Signed-off-by: Gregor Zeitlinger --- mise.lock | 2 +- mise.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mise.lock b/mise.lock index fa1e61730..188462f3f 100644 --- a/mise.lock +++ b/mise.lock @@ -336,7 +336,7 @@ url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/470058831" provenance = "github-attestations" [[tools."cargo:https://github.com/grafana/flint"]] -version = "rev:3f8aa74" +version = "rev:67309cf" backend = "cargo:https://github.com/grafana/flint" [[tools.editorconfig-checker]] diff --git a/mise.toml b/mise.toml index a2f327301..0a559aacf 100644 --- a/mise.toml +++ b/mise.toml @@ -12,7 +12,7 @@ actionlint = "1.7.12" "aqua:jonwiggins/xmloxide" = "v0.4.3" "aqua:owenlamont/ryl" = "0.21.0" biome = "2.5.3" -"cargo:https://github.com/grafana/flint" = "rev:3f8aa74" +"cargo:https://github.com/grafana/flint" = "rev:67309cf" editorconfig-checker = "3.8.0" google-java-format = "1.35.0" lychee = "0.24.2"