Repository navigation
Conversation
The -P/--source-path entry says the flag is equivalent to specifying `search-path` directives, but no such directive exists: the parser only accepts `source-path` (src/ShellCheck/Parser.hs), and an unknown key is reported as SC1107 and ignored. `search-path` appears nowhere else in the repository, and the DIRECTIVES section of this same page already uses the correct `source-path`.
This was referenced Oct 19, 2026
This branch has not been deployed
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.
Description
The
-P/--source-pathentry states that the flag "is equivalent to specifyingsearch-pathdirectives". There is nosearch-pathdirective.Evidence
src/ShellCheck/Parser.hsonly matches the key"source-path"inreadAnnotation's directive table (line 1050); any other key falls through to the catch-all branch at:1087, which emits SC1107 ("This directive is unknown. It will be ignored.").grep -rn 'search-path'over the whole repository matches onlyshellcheck.1.md:99— the string exists nowhere in the Haskell sources.source-path(shellcheck.1.md:289, with examples at:294and:312-316), and the option itself is spelled--source-path(shellcheck.hs:121-123).So a reader who copies
search-pathout of the-Pdescription into a# shellcheckcomment gets SC1107 and no effect.Change
One word in
shellcheck.1.md:search-path->source-path.shellcheck.1is generated from this file by./manpage(pandoc) and is gitignored, so it is not touched here.Testing
Documentation-only change to the man page source. No Haskell code is affected and nothing in
test/referencesshellcheck.1.md, socabal build/cabal testwere not re-run for this single-word change.Submitted with AI assistance; the doc/code discrepancy was verified line by line against the sources before opening.