fix: make flint-setup state-based#252
Merged
zeitlinger merged 5 commits intomainfrom May 5, 2026
Merged
Conversation
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
de7c0a2 to
cf19664
Compare
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes flint run --fix prematurely stopping after flint-setup performs a non-blocking normalization (e.g., mise [tools] ordering), by carrying setup fix results into the final summary while allowing subsequent fixers to run unless setup is considered blocking.
Changes:
- Adds an explicit
SetupOutcomeclassification toLinterOutput/CheckResultand teachesflint-setupto mark ordering-only drift as non-blocking. - Updates the main run flow so non-blocking
flint-setupfailures don’t short-circuit other checks, and setup results participate in final failure/fix summaries. - Adds E2E cases to assert “setup then continue” behavior for both
runandrun --fix.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/cases/general/setup-order-continues-fix/test.toml | New case asserting --fix continues to other fixers after setup normalization and includes setup in final fix summary. |
| tests/cases/general/setup-order-continues-fix/files/script.sh | Fixture shell script needing shfmt fix. |
| tests/cases/general/setup-order-continues-fix/files/mise.toml | Fixture mise config requiring canonical [tools] ordering normalization. |
| tests/cases/general/setup-order-continues-check/test.toml | New case asserting run continues other checks even when setup order is non-canon, and reports both failures. |
| tests/cases/general/setup-order-continues-check/files/script.sh | Fixture shell script needing shfmt diff in check mode. |
| tests/cases/general/setup-order-continues-check/files/mise.toml | Fixture mise config requiring canonical [tools] ordering normalization. |
| src/runner.rs | Propagates setup outcome through CheckResult. |
| src/registry/types.rs | Introduces SetupOutcome and threads it through LinterOutput. |
| src/registry/mod.rs | Re-exports SetupOutcome from registry types. |
| src/main.rs | Refactors result summarization and updates control flow to not short-circuit after non-blocking setup fixes. |
| src/linters/flint_setup.rs | Classifies setup findings into SetupOutcome (Clean/NonBlocking/Blocking/Fatal) and returns it in output. |
| src/linters/renovate_deps.rs | Updates LinterOutput struct literals for new field. |
| src/linters/lychee.rs | Updates LinterOutput struct literals for new field. |
| src/linters/license_header.rs | Updates LinterOutput struct literal for new field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
This was referenced May 4, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
martincostello
approved these changes
May 5, 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
Make
flint-setupstate-based and keeprun --fixmoving past non-blocking setup normalization.This PR combines the setup-control-flow change with the follow-up state-based migration model:
flint-setupno longer persists or advancessettings.setup_migration_versionmise.tomlflint-setup --fixstill does the heavy lifting for active setup migrations, but only when the current tool state actually activates that migration[tools]ordering normalization are carried into the final fix summary without short-circuiting the remaining fixersIn practice this keeps routine checks cheap and unsurprising, while still letting a Flint/tool update branch apply the full migration directly.
For the markdownlint-era stack, fix mode removes the old tool entries and applies the repo cleanup only when those legacy tools are still present in
mise.toml. Ambient stale comments in unrelated repos no longer surface as generic setup drift.Validation
cargo test flint_setup -- --nocapturecargo test init::tests -- --nocapturecargo test registry -- --nocaptureFLINT_CASES=general/flint-setup cargo test cases -- --nocaptureFLINT_CASES=general/setup-order-continues-fix cargo test cases -- --nocapturemise run lint:fixmise run lint