Skip to content

Commit ae0f769

Browse files
committed
chore: migrate from super-linter to flint v2
Replace super-linter, lint:links, and lint:renovate-deps with a single flint run invocation. Add google-java-format and standard lint tools (shellcheck, shfmt, prettier, markdownlint-cli2, actionlint, editorconfig-checker, codespell, ruff) to mise.toml. flint.toml excludes docs/themes/ (Hugo theme), src/main/generated/ (generated code), and mvnw (generated Maven wrapper with known shellcheck issues). renovate-deps exclude_managers migrated from the former RENOVATE_TRACKED_DEPS_EXCLUDE env var. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent b81332e commit ae0f769

2 files changed

Lines changed: 31 additions & 18 deletions

File tree

.github/config/flint.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[settings]
2+
exclude_paths = [
3+
"docs/themes/",
4+
"src/main/generated/",
5+
"mvnw",
6+
]
7+
8+
[checks.renovate-deps]
9+
exclude_managers = ["github-actions", "github-runners"]

mise.toml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
[tools]
2+
"cargo:https://github.com/grafana/flint" = "branch:feat/flint-v2"
23
"go:github.com/gohugoio/hugo" = "v0.157.0"
34
"go:github.com/grafana/oats" = "0.6.1"
5+
"ubi:google/google-java-format" = "1.26.0"
6+
actionlint = "1.7.10"
7+
editorconfig-checker = "v3.6.1"
48
java = "temurin-25.0.2+10.0.LTS"
59
lychee = "0.23.0"
610
node = "24.14.0"
11+
"npm:markdownlint-cli2" = "0.17.2"
12+
"npm:prettier" = "3.8.1"
713
"npm:renovate" = "43.45.1"
14+
"pipx:codespell" = "2.4.1"
15+
"pipx:ruff" = "0.15.0"
816
protoc = "34.0"
17+
shellcheck = "v0.11.0"
18+
shfmt = "v3.12.0"
919

1020
[env]
11-
RENOVATE_TRACKED_DEPS_EXCLUDE="github-actions,github-runners"
12-
# renovate: datasource=docker depName=ghcr.io/super-linter/super-linter
13-
SUPER_LINTER_VERSION="slim-v8.5.0@sha256:857dcc3f0bf5dd065fdeed1ace63394bb2004238a5ef02910ea23d9bcd8fd2b8"
21+
FLINT_CONFIG_DIR = ".github/config"
1422

1523
[tasks.ci]
1624
description = "CI Build"
@@ -49,26 +57,22 @@ run = "./mvnw verify"
4957
description = "build all modules without tests"
5058
run = "./mvnw install -DskipTests -Dcoverage.skip=true"
5159

52-
# Shared lint tasks from flint (https://github.com/grafana/flint)
53-
[tasks."lint:super-linter"]
54-
description = "Run Super-Linter on the repository"
55-
file = "https://raw.githubusercontent.com/grafana/flint/0ac131d7832bd8964f6ca9e5af73207dca6a85ba/tasks/lint/super-linter.sh" # v0.7.1
56-
57-
[tasks."lint:links"]
58-
description = "Lint links"
59-
file = "https://raw.githubusercontent.com/grafana/flint/0ac131d7832bd8964f6ca9e5af73207dca6a85ba/tasks/lint/links.sh" # v0.7.1
60-
61-
[tasks."lint:renovate-deps"]
62-
description = "Verify renovate-tracked-deps.json is up to date"
63-
file = "https://raw.githubusercontent.com/grafana/flint/0ac131d7832bd8964f6ca9e5af73207dca6a85ba/tasks/lint/renovate-deps.py" # v0.7.1
64-
6560
[tasks."lint"]
6661
description = "Run all lints"
67-
depends = ["lint:super-linter", "lint:links", "lint:bom", "lint:example-poms", "lint:renovate-deps"]
62+
depends = ["lint:bom", "lint:example-poms"]
63+
run = "flint run"
64+
65+
[tasks."lint:fix"]
66+
description = "Auto-fix lint issues"
67+
run = "flint run --fix"
68+
69+
[tasks."lint:pre-commit"]
70+
description = "Fast auto-fix lint pass — intended for pre-commit/pre-push hooks"
71+
run = "flint run --fix --fast-only"
6872

6973
[tasks.fix]
7074
description = "Auto-fix lint issues"
71-
run = "AUTOFIX=true mise run lint"
75+
run = "flint run --fix"
7276

7377
[tasks.acceptance-test]
7478
description = "Run OATs acceptance tests"

0 commit comments

Comments
 (0)