Unknown directives in .shellcheckrc are silently ignored · Issue #3591 · koalaman/shellcheck · GitHub
Skip to content

Unknown directives in .shellcheckrc are silently ignored #3591

Open

Description

@e-kwsm

For bugs with existing features

Here's a snippet or screenshot that shows the problem:

$ shellcheck --rcfile=<(<<< foo=bar) -s sh /dev/null

Here's what shellcheck currently says:

Nothing

Here's what I wanted or expected to see:

In /proc/self/fd/12 line 1:
foo=bar
^-- SC1107 (warning): This directive is unknown. It will be ignored.

similarly to a directive in a script

$ shellcheck -s sh - <<< '# shellcheck foo=bar'

In - line 1:
# shellcheck foo=bar
             ^-- SC1107 (warning): This directive is unknown. It will be ignored.

For more information:
  https://www.shellcheck.net/wiki/SC1107 -- This directive is unknown. It wil...

Activity

  1. eyadstein commented on Oct 22, 2026

    @eyadstein

    Hi! I'd like to work on this issue as my first contribution to ShellCheck. I'll investigate how unknown directives are handled in .shellcheckrc, add a regression test, and implement a focused fix while preserving the existing behavior for valid directives. I'll run the relevant tests before submitting a pull request. Please let me know if anyone is already working on this or if you have any preferred approach.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions