chore: migrate from flint v1 (super-linter) to flint v2 binary#1251
chore: migrate from flint v1 (super-linter) to flint v2 binary#1251zeitlinger merged 29 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates repository linting from flint v1’s remote tasks + super-linter to the flint v2 CLI, centralizing lint configuration under .github/config/flint.toml and running lint via mise.
Changes:
- Replace
mise-based remote lint tasks withflint run/flint run --fix. - Add flint v2 configuration for license-header checking and renovate-deps behavior.
- Expand
mise.tomltool pins to cover the linters previously executed via super-linter, and update tracked deps accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
mise.toml |
Pins flint v2 and related lint toolchain; switches lint/fix tasks to flint run. |
.github/renovate-tracked-deps.json |
Updates tracked mise tools to reflect the new toolchain pins. |
.github/config/super-linter.env |
Removes the super-linter configuration (no longer used). |
.github/config/flint.toml |
Introduces flint configuration (global excludes, license-header check, renovate-deps settings). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## 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>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Summary
.github/config/flint.tomlwith the repo Java/Kotlin license-header check for the current Grafana SPDX-style header, plus renovate-deps manager exclusions and generated-file excludesmise.tomltools to cover the repo lint stack: flint, google-java-format, ktlint, shellcheck, shfmt, actionlint, prettier, markdownlint-cli2, codespell, editorconfig-checker, hadolint, lychee.markdownlint.yaml, enforces Markdown line length via.editorconfigwith aCHANGELOG.mdexemption, and wraps docs to match the current policy