Skip to content

man: fix the directive name for --source-path - #3577

Open
ump45nose wants to merge 1 commit into
koalaman:masterfrom
ump45nose:man/fix-source-path-directive-name
Open

ump45nose wants to merge 1 commit into
koalaman:masterfrom
ump45nose:man/fix-source-path-directive-name

Conversation

@ump45nose

Copy link
Copy Markdown
Contributor

Description

The -P / --source-path entry states that the flag "is equivalent to specifying search-path directives". There is no search-path directive.

Evidence

  • src/ShellCheck/Parser.hs only matches the key "source-path" in readAnnotation'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 only shellcheck.1.md:99 — the string exists nowhere in the Haskell sources.
  • The DIRECTIVES section of this very page already documents the correct key as source-path (shellcheck.1.md:289, with examples at :294 and :312-316), and the option itself is spelled --source-path (shellcheck.hs:121-123).

So a reader who copies search-path out of the -P description into a # shellcheck comment gets SC1107 and no effect.

Change

One word in shellcheck.1.md: search-path -> source-path. shellcheck.1 is 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/ references shellcheck.1.md, so cabal build / cabal test were 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.

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 branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant