chore: migrate from super-linter to flint v2#1988
Merged
zeitlinger merged 39 commits intoprometheus:mainfrom Apr 22, 2026
Merged
chore: migrate from super-linter to flint v2#1988zeitlinger merged 39 commits intoprometheus:mainfrom
zeitlinger merged 39 commits intoprometheus:mainfrom
Conversation
3 tasks
zeitlinger
added a commit
to grafana/flint
that referenced
this pull request
Apr 10, 2026
## Summary Introduces the `flint` Rust binary: a mise-native lint orchestrator that replaces the v1 bash task scripts. **How it works**: reads installed tools from `mise.toml`, maps them to a built-in check registry, runs checks against changed files (merge-base diff) in parallel. Special checks (lychee links, renovate-deps) are implemented in Rust. ## File breakdown 282 files changed — the count is misleading without context: | Category | Files | |---|---| | `tests/` — e2e test fixtures (70 test cases × ~3-4 files each) | 248 | | `src/` — Rust source | 13 | | Config, docs, CI, Cargo | 21 | The 23 linters covered by e2e tests: actionlint, biome, biome-format, cargo-clippy, cargo-fmt, codespell, dotnet-format, editorconfig-checker, gofmt, golangci-lint, google-java-format, hadolint, ktlint, license-header, lychee, markdownlint-cli2, prettier, renovate-deps, ruff, ruff-format, shellcheck, shfmt, plus general cases. ## What's not in this PR **Deferred features:** - `flint hook install` — installs a git pre-commit hook; replaces the per-repo `mise run setup:pre-commit-hook` task with something self-contained in the CLI - `check_task` / `fix_task` in `flint.toml` — allows a fast script (e.g. regex/Python) as the check with a slow canonical fixer (e.g. Gradle); motivating use case: javaagent's `StaticImportFormatter` - Biome config injection — `--config-path` takes a directory, not a file; needs a directory-injection variant in the registry API **Low-priority linters** (no consuming repo needs them yet): - `merge-conflict-markers` — pure-Rust special check - `dotenv-linter`, `go-mod-tidy`, `xmllint` **Post-merge:** - Bash task scripts (`tasks/lint/`) — retire once consumer PRs are merged - GitHub release / `github:grafana/flint` registration — cut after this PR merges; consumer repos switch from branch tracking to a pinned version ## Consumer migration status All 7 consumer PRs green — validated across Rust, Go, Java, Kotlin, Python, .NET, Shell, Dockerfile: - grafana/mox [#63](grafana/mox#63) - grafana/oats [#272](grafana/oats#272) - grafana/otel-checker [#267](grafana/otel-checker#267) - grafana/grafana-opentelemetry-java [#1251](grafana/grafana-opentelemetry-java#1251) - grafana/docker-otel-lgtm [#1243](grafana/docker-otel-lgtm#1243) - prometheus/client_java [#1988](prometheus/client_java#1988) - open-telemetry/opentelemetry-java-instrumentation [#17759](open-telemetry/opentelemetry-java-instrumentation#17759) ## Test plan - [x] CI passes - [x] `flint list` shows all registry entries with correct installed/missing status - [x] All 7 consumer PRs pass CI Release-As: 0.20.0 --------- Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
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>
exclude_paths uses prefix matching from the project root, so "src/main/generated/" did not match the nested path "prometheus-metrics-exposition-formats/src/main/generated/". Switch to exclude (regex, substring match) which works for any depth. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
- .markdownlint.json: disable MD013/MD031/MD033/MD036 (line length, fences, inline HTML, emphasis-as-heading — all pre-existing in docs) - .codespellrc: ignore nd/atmost/re-use/errorprone (false positives in Java identifiers and comments) - .editorconfig: extend workflow exemption to all .github/workflows/*.yml at 300 chars; add CODE_OF_CONDUCT.md to high-limit group - .editorconfig-checker.json: explicitly exclude *.java (handled by google-java-format via defer_to_formatters, belt-and-suspenders) - flint.toml: add simpleclient-archive/ to exclude_paths - SpanContext.java: fix Examplar → Exemplar typo - renovate-tracked-deps.json: regenerated (pretty-print normalisation) - java-version-matrix-tests.yml: prettier quote normalisation - Metrics.java: google-java-format string split normalisation Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
…markdownlint config Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
…ithub: backend Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
…tless removal Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Adds cargo:xmloxide which installs the xmllint binary — validates well-formedness of all *.xml files (pom.xml, version-rules.xml, etc.). Also migrates flint.toml from the old exclude/exclude_paths fields to the new single glob list format (required by current flint v2). Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
f064804 to
f51249c
Compare
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
This reverts commit 88348f7. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
jaydeluca
reviewed
Apr 22, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
jaydeluca
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lint:super-linter,lint:links, andlint:renovate-depstasks with a singleflint runinvocationgoogle-java-formatviagithub:google/google-java-formatand standard native lint tools throughmise.github/config/flint.tomlwith path exclusions (docs/themes/,src/main/generated/,mvnw,simpleclient-archive/) and migratesRENOVATE_TRACKED_DEPS_EXCLUDEto[checks.renovate-deps] exclude_managersmise v2026.4.16soraw_args = trueis supported in the flint-backedlinttaskTest plan
mise run lintmise run lint:fixflint run --fix renovate-depsreflected in.github/renovate-tracked-deps.json