Repository navigation
Check extensionless scripts in style commands - #24063
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Two moderate issues remain in shell-script filtering and repeated script discovery.
Review effort: Lite
Findings: None
What changed in this PR
Updates style checks to lint extensionless shell scripts for explicit paths and --changed checks.
Changes:
- Recognises package scripts, Bash completions, and
Dockerfile. - Routes detected scripts through ShellCheck and shfmt.
- Adds regression coverage for detection and failure propagation.
| File | Summary |
|---|---|
Library/Homebrew/test/style_spec.rb |
Tests extensionless script detection and linter failures. |
Library/Homebrew/test/dev-cmd/style_spec.rb |
Tests changed-file detection. |
Library/Homebrew/style.rb |
Classifies known shell scripts for linting; needs an empty-filter guard. |
Library/Homebrew/dev-cmd/style.rb |
Detects extensionless scripts with --changed; needs lazy caching of discovered scripts. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Use the shell script list for explicit paths and `--changed` so `brew lgtm` cannot silently skip package installer scripts. - Cover package scripts, Bash completions and `Dockerfile`, including propagation of ShellCheck and shfmt failures.
MikeMcQuaid
force-pushed
the
style-extensionless-scripts
branch
from
September 21, 2026 21:11
e9f7a34 to
87226fc
Compare
nandahkrishna
approved these changes
Sep 22, 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.
--changedsobrew lgtmcannot silently skip package installer scripts.Dockerfile, including propagation of ShellCheck and shfmt failures.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 6 Astra with local review and testing.