From 430675e684204c55c41b071907a989f5997effa9 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 19 Mar 2026 09:54:55 +0000 Subject: [PATCH 1/2] ci: add native linting and exclude CHANGELOG.md from lint - Add lint:spotless task for Java format checking - Add lint:fast grouping (super-linter + links + bom + example-poms + spotless) - Add native-lint task (NATIVE=true, no container needed) - Switch pre-commit to NATIVE=true mise run lint:fast - Exclude generated CHANGELOG.md from super-linter and lychee Depends on grafana/flint#107 (NATIVE env var) and grafana/flint#112 (v8.5.0 version mapping). Signed-off-by: Gregor Zeitlinger --- mise.toml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/mise.toml b/mise.toml index 9c8713058..670dd97cb 100644 --- a/mise.toml +++ b/mise.toml @@ -50,6 +50,7 @@ description = "build all modules without tests" run = "./mvnw install -DskipTests -Dcoverage.skip=true" # Shared lint tasks from flint (https://github.com/grafana/flint) +# TODO: update SHA after grafana/flint#107 and grafana/flint#112 merge [tasks."lint:super-linter"] description = "Run Super-Linter on the repository" file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/super-linter.sh" # v0.8.0 @@ -65,22 +66,38 @@ file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f [tasks."setup:native-lint-tools"] description = "Install native lint tools matching the pinned super-linter version" file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/setup/native-lint-tools.sh" # v0.8.0 -[tasks.pre-commit] -description = "Pre-commit hook: native lint with autofix" -depends = ["setup:native-lint-tools"] -run = "mise run lint:super-linter -- --native --autofix" -[tasks."setup:pre-commit-hook"] -description = "Install git pre-commit hook that runs native linting" -run = "mise generate git-pre-commit --write --task=pre-commit" + +[tasks."lint:spotless"] +description = "Check Java formatting with Spotless" +# examples don't have the spotless plugin, so we exclude them via the profile. +# integration-tests are covered by the CI build task. +run = "./mvnw com.diffplug.spotless:spotless-maven-plugin:check -P '!examples-and-integration-tests' -q" + +[tasks."lint:fast"] +description = "Run fast lints (no Renovate)" +depends = ["lint:super-linter", "lint:links", "lint:bom", "lint:example-poms", "lint:spotless"] [tasks."lint"] description = "Run all lints" -depends = ["lint:super-linter", "lint:links", "lint:bom", "lint:example-poms", "lint:renovate-deps"] +depends = ["lint:fast", "lint:renovate-deps"] [tasks.fix] description = "Auto-fix lint issues" run = "AUTOFIX=true mise run lint" +[tasks.native-lint] +description = "Run lints natively (no container)" +run = "NATIVE=true mise run lint:fast" + +[tasks.pre-commit] +description = "Pre-commit hook: native lint" +depends = ["setup:native-lint-tools"] +run = "NATIVE=true mise run lint:fast" + +[tasks."setup:pre-commit-hook"] +description = "Install git pre-commit hook that runs native linting" +run = "mise generate git-pre-commit --write --task=pre-commit" + [tasks.acceptance-test] description = "Run OATs acceptance tests" depends = "build" From 0276f13520250d26d3111e462eda30a8840e5abb Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 19 Mar 2026 15:14:46 +0000 Subject: [PATCH 2/2] ci: bump flint to v0.9.1, enable native lint env activation Update flint SHA to v0.9.1 which activates the mise named environment in native lint mode, fixing tool discovery for shfmt, actionlint, codespell etc. Signed-off-by: Gregor Zeitlinger --- mise.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mise.toml b/mise.toml index 670dd97cb..9ebc92d85 100644 --- a/mise.toml +++ b/mise.toml @@ -50,22 +50,21 @@ description = "build all modules without tests" run = "./mvnw install -DskipTests -Dcoverage.skip=true" # Shared lint tasks from flint (https://github.com/grafana/flint) -# TODO: update SHA after grafana/flint#107 and grafana/flint#112 merge [tasks."lint:super-linter"] description = "Run Super-Linter on the repository" -file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/super-linter.sh" # v0.8.0 +file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/lint/super-linter.sh" # v0.9.1 [tasks."lint:links"] description = "Lint links" -file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/links.sh" # v0.8.0 +file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/lint/links.sh" # v0.9.1 [tasks."lint:renovate-deps"] description = "Verify renovate-tracked-deps.json is up to date" -file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/renovate-deps.py" # v0.8.0 +file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/lint/renovate-deps.py" # v0.9.1 [tasks."setup:native-lint-tools"] description = "Install native lint tools matching the pinned super-linter version" -file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/setup/native-lint-tools.sh" # v0.8.0 +file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/setup/native-lint-tools.sh" # v0.9.1 [tasks."lint:spotless"] description = "Check Java formatting with Spotless"