fix: expand baseline guards for config and flint changes#215
Merged
zeitlinger merged 2 commits intomainfrom Apr 23, 2026
Merged
fix: expand baseline guards for config and flint changes#215zeitlinger merged 2 commits intomainfrom
zeitlinger merged 2 commits intomainfrom
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
This PR tightens flint’s linter-config handling by explicitly registering baseline-triggering config files and known unsupported upstream/alternate config locations, then failing early when unsupported configs are detected for active checks.
Changes:
- Extend registry
Checkmetadata withbaseline_configsandunsupported_configs, plus aConfigFiledescriptor for config detection. - Add runtime detection: baseline expansion now keys off registered
baseline_configs, andflint runhard-fails if an active check’sunsupported_configsare present. - Add/extend E2E fixtures and docs to cover canonical-config behavior (including
.editorconfigtriggering baseline foreditorconfig-checker).
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cases/general/unsupported-alternate-config/test.toml | Adds an E2E expectation asserting flint fails on an unsupported alternate shellcheck config. |
| tests/cases/general/unsupported-alternate-config/files/shellcheckrc | Fixture for an unsupported shellcheck config filename. |
| tests/cases/general/unsupported-alternate-config/files/mise.toml | Activates shellcheck for the unsupported-config E2E case. |
| tests/cases/general/unsupported-alternate-config/files/good.sh | Provides a simple shell script input for the E2E case. |
| tests/cases/general/baseline-editorconfig-change/test.toml | Adds an E2E expectation verifying .editorconfig changes trigger baseline runs for editorconfig-checker. |
| tests/cases/general/baseline-editorconfig-change/files/mise.toml | Activates editorconfig-checker for the baseline-trigger E2E case. |
| tests/cases/general/baseline-editorconfig-change/files/hello.txt | Fixture file with trailing whitespace to demonstrate baseline-triggered failure. |
| tests/cases/general/baseline-editorconfig-change/files/.editorconfig | Baseline .editorconfig version for the baseline-trigger E2E case. |
| tests/cases/general/baseline-editorconfig-change/changes/.editorconfig | “Changed” .editorconfig used to exercise the baseline expansion path. |
| src/runner.rs | Updates internal test-only Check literals to include the new Check fields. |
| src/registry/types.rs | Introduces baseline_configs / unsupported_configs on Check and adds ConfigFile/ConfigMatch types. |
| src/registry/mod.rs | Re-exports the new config types for use outside the registry module. |
| src/registry/checks.rs | Registers baseline and unsupported config metadata per built-in linter (including .editorconfig for ec). |
| src/main.rs | Implements baseline triggering via baseline_configs and adds early failure on detected unsupported configs. |
| docs/cli.md | Documents baseline triggers beyond the injected config and explains canonical-config enforcement behavior. |
| .github/agents/knowledge/linters.md | Documents how to register baseline vs unsupported configs when adding linters. |
| .github/agents/knowledge/architecture.md | Updates architecture notes to reflect baseline triggers and canonical-config enforcement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
.editorconfigas a baseline-triggering config foreditorconfig-checkergithub:grafana/flintversion changes inmise.tomlValidation
FLINT_CASES=general/baseline-flint-upgrade cargo test casesmise run lint:fixcargo test -q