Skip to content

man: document that --norc also disables --rcfile - #3598

Open
ump45nose wants to merge 1 commit into
koalaman:masterfrom
ump45nose:man-rcfile-norc
Open

ump45nose wants to merge 1 commit into
koalaman:masterfrom
ump45nose:man-rcfile-norc

Conversation

@ump45nose

Copy link
Copy Markdown
Contributor

The man page documents --norc as not looking for .shellcheckrc/.editorconfig and --rcfile as preferring the given file over searching — but combining them (shellcheck --norc --rcfile=X) silently ignores X entirely: readConfigFile short-circuits on ignoreRC before the config lookup ever runs (src/ShellCheck/Parser.hs:3282-3285), so the rcfile is not read and not even the usual "unable to read --rcfile" warning fires.

This documents the interaction on both entries: --norc also disables --rcfile, and the rcfile is not read if --norc is given.

Testing: docs-only change to shellcheck.1.md; behavior verified against shellcheck.hs (csIgnoreRC) and src/ShellCheck/Parser.hs (readConfigFile).

readConfigFile short-circuits when --norc is set
(src/ShellCheck/Parser.hs), so an explicit --rcfile is silently not
read either, without even the usual warning. Spell this out on both
man page entries.

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