Skip to content

Commit 733f571

Browse files
authored
ci: bump flint to v0.9.1, add native lint tasks (#1224)
## Summary - Bump flint from v0.8.0 to v0.9.1 (all three lint task URLs) - Add native lint tasks: `setup:native-lint-tools`, `lint:fast`, `native-lint`, `pre-commit`, `setup:pre-commit-hook` - Restructure `lint` to depend on `lint:fast` + `lint:renovate-deps` ## Test plan - [ ] CI passes with updated flint URLs - [ ] `mise run setup:native-lint-tools && mise run native-lint` works locally - [ ] `mise run lint` still runs all lints including renovate-deps --------- Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 2028242 commit 733f571

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

mise.toml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,44 @@ run = "./gradlew build"
1616
# Shared lint tasks from flint (https://github.com/grafana/flint)
1717
[tasks."lint:super-linter"]
1818
description = "Run Super-Linter on the repository"
19-
file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/super-linter.sh" # v0.8.0
19+
file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/lint/super-linter.sh" # v0.9.1
2020

2121
[tasks."lint:links"]
2222
description = "Check for broken links in changed files + all local links"
23-
file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/links.sh" # v0.8.0
23+
file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/lint/links.sh" # v0.9.1
2424

2525
[tasks."lint:renovate-deps"]
2626
description = "Verify renovate-tracked-deps.json is up to date"
27-
file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/renovate-deps.py" # v0.8.0
27+
file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/lint/renovate-deps.py" # v0.9.1
28+
29+
[tasks."setup:native-lint-tools"]
30+
description = "Install native lint tools matching the pinned super-linter version"
31+
file = "https://raw.githubusercontent.com/grafana/flint/8a39d96e17327c54974623b252eb5260d67ed68a/tasks/setup/native-lint-tools.sh" # v0.9.1
32+
33+
[tasks."lint:spotless"]
34+
description = "Check Java formatting with Spotless"
35+
run = "./gradlew spotlessCheck"
36+
37+
[tasks."lint:fast"]
38+
description = "Run fast lints (no Renovate)"
39+
depends = ["lint:super-linter", "lint:links", "lint:spotless"]
40+
41+
[tasks.native-lint]
42+
description = "Run lints natively (no container)"
43+
run = "NATIVE=true mise run lint:fast"
44+
45+
[tasks.pre-commit]
46+
description = "Pre-commit hook: native lint"
47+
depends = ["setup:native-lint-tools"]
48+
run = "NATIVE=true mise run lint:fast"
49+
[tasks."setup:pre-commit-hook"]
50+
description = "Install git pre-commit hook that runs native linting"
51+
run = "mise generate git-pre-commit --write --task=pre-commit"
2852

2953
[tasks.lint]
3054
description = "Run all lints"
31-
depends = ["lint:super-linter", "lint:links", "lint:renovate-deps"]
55+
depends = ["lint:fast", "lint:renovate-deps"]
3256

3357
[tasks.fix]
3458
description = "Auto-fix lint issues and regenerate tracked deps"
35-
run = "AUTOFIX=true mise run lint"
59+
run = ["./gradlew spotlessApply", "AUTOFIX=true mise run lint"]

0 commit comments

Comments
 (0)