fix: fail native lint when enabled tools are missing#111
Merged
zeitlinger merged 2 commits intomainfrom Mar 17, 2026
Merged
Conversation
Previously, missing native lint tools were silently skipped with a warning, allowing commits to pass the pre-commit hook even when linters couldn't run. Now missing tools are treated as failures with a message pointing to `mise run setup:native-lint-tools`. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the native lint workflow to fail fast when required native linter tools are missing, preventing false “pass” results in pre-commit/CI scenarios where linters can’t actually run.
Changes:
- Treat missing native linter executables as failures (not just warnings) in
super-linter.sh. - Print an actionable install hint for missing native tools.
- Update
AGENTS.mdto reflect the new native lint behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/lint/super-linter.sh | Converts “missing tool” from skip/warn into a failing condition with an install instruction. |
| AGENTS.md | Documents that native mode now fails when enabled tools are missing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use separate arrays for skipped tool names and flags so the "Missing native lint tools" message shows actual tool binaries (e.g. shellcheck, prettier) while _failed still tracks flags for the summary.
martincostello
approved these changes
Mar 16, 2026
zeitlinger
pushed a commit
that referenced
this pull request
Mar 19, 2026
🤖 I have created a release *beep* *boop* --- ## [0.9.0](v0.8.0...v0.9.0) (2026-03-19) ### Features * support NATIVE env var for container-free linting ([#107](#107)) ([0a8193d](0a8193d)) ### Bug Fixes * decouple version mapping generation from pinned super-linter version ([#112](#112)) ([5370e77](5370e77)) * fail native lint when enabled tools are missing ([#111](#111)) ([163bb6b](163bb6b)) * tighten markdownlint config for native mode ([#106](#106)) ([6ef25b2](6ef25b2)) --- > [!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
silently skipping them with a warning
Run mise run setup:native-lint-tools to install themactually run (e.g. when
setup:native-lint-toolsfailed due to a missingversion file)
Context
Discovered via prometheus/client_java#1945
where
CONTRIBUTING.mdhad a 282-char line that passed the pre-commit hookbecause
editorconfig-checkerwasn't installed (thev8.5.0.tomlversionfile was missing from flint, so
setup:native-lint-toolscouldn't installtools).
Test plan
message instead of a warning