Skip to content

fix: make flint-setup state-based#252

Merged
zeitlinger merged 5 commits intomainfrom
codex/mise-order-continue
May 5, 2026
Merged

fix: make flint-setup state-based#252
zeitlinger merged 5 commits intomainfrom
codex/mise-order-continue

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

@zeitlinger zeitlinger commented Apr 28, 2026

Summary

Make flint-setup state-based and keep run --fix moving past non-blocking setup normalization.

This PR combines the setup-control-flow change with the follow-up state-based migration model:

  • flint-setup no longer persists or advances settings.setup_migration_version
  • routine setup checks stay focused on current actionable setup state from mise.toml
  • flint-setup --fix still does the heavy lifting for active setup migrations, but only when the current tool state actually activates that migration
  • non-blocking setup fixes such as [tools] ordering normalization are carried into the final fix summary without short-circuiting the remaining fixers

In 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 -- --nocapture
  • cargo test init::tests -- --nocapture
  • cargo test registry -- --nocapture
  • FLINT_CASES=general/flint-setup cargo test cases -- --nocapture
  • FLINT_CASES=general/setup-order-continues-fix cargo test cases -- --nocapture
  • mise run lint:fix
  • mise run lint

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the codex/mise-order-continue branch from de7c0a2 to cf19664 Compare April 30, 2026 13:01
zeitlinger added 2 commits May 4, 2026 10:12
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger marked this pull request as ready for review May 4, 2026 10:34
@zeitlinger zeitlinger requested a review from a team as a code owner May 4, 2026 10:34
Copilot AI review requested due to automatic review settings May 4, 2026 10:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SetupOutcome classification to LinterOutput/CheckResult and teaches flint-setup to mark ordering-only drift as non-blocking.
  • Updates the main run flow so non-blocking flint-setup failures 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 run and run --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.

Comment thread src/main.rs
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger changed the title fix: continue lint fixes after setup normalization fix: make flint-setup state-based May 4, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger merged commit 73dfcb0 into main May 5, 2026
13 checks passed
@zeitlinger zeitlinger deleted the codex/mise-order-continue branch May 5, 2026 13:36
This was referenced May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants