diff --git a/.github/renovate-tracked-deps.json b/.github/renovate-tracked-deps.json index 513b437c6..18ab66cb3 100644 --- a/.github/renovate-tracked-deps.json +++ b/.github/renovate-tracked-deps.json @@ -157,12 +157,13 @@ "mise.toml": { "mise": [ "actionlint", - "aqua:grafana/flint", + "aqua:checkstyle/checkstyle", "aqua:grafana/gcx", "aqua:grafana/oats", "aqua:jonwiggins/xmloxide", "aqua:owenlamont/ryl", "biome", + "cargo:https://github.com/grafana/flint", "editorconfig-checker", "google-java-format", "hugo", 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 82e964658..b1b9d6cfe 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -21,4 +21,12 @@ + + + + + + + diff --git a/mise.lock b/mise.lock index fb15a188d..188462f3f 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" @@ -296,6 +335,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:67309cf" +backend = "cargo:https://github.com/grafana/flint" + [[tools.editorconfig-checker]] version = "3.8.0" backend = "aqua:editorconfig-checker/editorconfig-checker" diff --git a/mise.toml b/mise.toml index a9dbac2bc..0a559aacf 100644 --- a/mise.toml +++ b/mise.toml @@ -8,10 +8,11 @@ protoc = "35.1" # Linters actionlint = "1.7.12" -"aqua:grafana/flint" = "0.22.7" +"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:67309cf" editorconfig-checker = "3.8.0" google-java-format = "1.35.0" lychee = "0.24.2" @@ -46,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" @@ -76,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