fix: baseline lint coverage changes#214
Merged
zeitlinger merged 5 commits intomainfrom Apr 23, 2026
Merged
Conversation
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
martincostello
approved these changes
Apr 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Implements baseline lint coverage behavior so that newly-activated linters and linter/config changes trigger a one-time full-file run to establish a consistent baseline (including improving ShellCheck source resolution), and adds regression fixtures to lock in the behavior.
Changes:
- Add baseline selection logic so newly active linters and relevant config changes run against all matching files once.
- Update ShellCheck invocation to follow sourced files using
-x -P SCRIPTDIR. - Add/extend end-to-end regression fixtures for baseline scenarios and ShellCheck sourced-file behavior; update Renovate linter grouping.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/cases/shellcheck/sourced-file/test.toml | Adds a ShellCheck fixture asserting sourced-file handling succeeds in --full mode. |
| tests/cases/shellcheck/sourced-file/files/mise.toml | Declares ShellCheck tool for the sourced-file fixture repo. |
| tests/cases/shellcheck/sourced-file/files/docker/run-pyroscope.sh | Provides a shell script that sources a sibling file to exercise ShellCheck -x resolution. |
| tests/cases/shellcheck/sourced-file/files/docker/logging.sh | Sourced shell file used by the sourced-file fixture. |
| tests/cases/general/baseline-new-linter/test.toml | Adds fixture asserting a newly enabled linter establishes baseline by scanning all relevant files. |
| tests/cases/general/baseline-new-linter/files/mise.toml | Baseline repo state without the newly enabled linter tool declared. |
| tests/cases/general/baseline-new-linter/files/bad.sh | Introduces a shell script that intentionally fails ShellCheck to validate baseline behavior. |
| tests/cases/general/baseline-new-linter/changes/mise.toml | Enables ShellCheck in the fixture’s “changed” state to simulate a newly activated linter. |
| tests/cases/general/baseline-flint-settings-change/test.toml | Adds fixture for baseline behavior triggered by global flint.toml settings changes. |
| tests/cases/general/baseline-flint-settings-change/files/mise.toml | Declares ShellCheck tool for the settings-change baseline fixture. |
| tests/cases/general/baseline-flint-settings-change/files/config/flint.toml | Fixture flint settings that exclude a failing file initially. |
| tests/cases/general/baseline-flint-settings-change/files/bad.sh | ShellCheck-failing file used to validate settings-change baseline behavior. |
| tests/cases/general/baseline-flint-settings-change/changes/config/flint.toml | Fixture change that updates global settings (exclude list) to trigger a baseline run. |
| tests/cases/general/baseline-config-change/test.toml | Adds fixture for baseline behavior triggered by linter-specific config changes. |
| tests/cases/general/baseline-config-change/files/mise.toml | Declares ShellCheck tool for the linter-config-change fixture. |
| tests/cases/general/baseline-config-change/files/config/.shellcheckrc | Fixture linter config initially disabling SC2086. |
| tests/cases/general/baseline-config-change/files/bad.sh | ShellCheck-failing file used to validate config-change baseline behavior. |
| tests/cases/general/baseline-config-change/changes/config/.shellcheckrc | Fixture change that re-enables SC2086 to trigger baseline behavior. |
| src/runner.rs | Makes RunOptions Copy/Clone to support reuse when partitioning baseline vs normal runs. |
| src/registry/mod.rs | Re-exports read_mise_tools_at_ref for baseline detection logic. |
| src/registry/mise.rs | Adds ability to read mise.toml tool declarations from a git ref (git show). |
| src/registry/checks.rs | Updates ShellCheck command template to shellcheck -x -P SCRIPTDIR {FILE}. |
| src/main.rs | Implements baseline selection logic and routes execution through a helper that runs baseline checks against an all-files list. |
| src/files.rs | Adds files::all() helper and uses it for the --full and “no merge base” fallback paths. |
| default.json | Updates Renovate linter package grouping to match the current tool keys/names. |
💡 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>
Merged
zeitlinger
pushed a commit
that referenced
this pull request
Apr 23, 2026
### Added - group linter renovate updates ([#209](#209)) ### Fixed - expand baseline guards for config and flint changes ([#215](#215)) - remove stale exclude_paths init placeholder ([#211](#211)) - baseline lint coverage changes ([#214](#214)) - align biome init and formatter ownership ([#205](#205)) ### Other - *(deps)* update dependency npm:renovate to v43.133.0 ([#216](#216)) - *(deps)* update dependency npm:renovate to v43.132.2 ([#212](#212)) - *(deps)* update taiki-e/install-action digest to 5f57d6c ([#204](#204)) - clarify that flint init works with existing mise.toml ([#208](#208)) - guard against overlapping fixer ownership ([#206](#206)) > [!IMPORTANT] > Close and reopen this PR to trigger CI checks. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
Fixes #213.
flint.tomlsettings changes from per-check special config changes-x -P SCRIPTDIRso sourced sibling files resolve correctlyValidation
FLINT_CASES=general/baseline-flint-settings-change cargo test casesFLINT_CASES=general/baseline-new-linter cargo test casesFLINT_CASES=general/baseline-config-change cargo test casesFLINT_CASES=shellcheck cargo test casesmise run testmise run lint:fix