Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

.shellcheckrc: shell=unknown directive is silently ignored

Open
#3,592 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
haskell, shell
Domain
cli, devtools

Research direction

Start by tracing how .shellcheckrc directives are parsed and validated, then compare the shell=unknown handling with the existing # shellcheck shell=csh and -s csh behavior shown in the issue. Reproduce the silent ignore with the provided --rcfile command and locate the relevant parser tests. Done means an unknown shell in .shellcheckrc produces a useful diagnostic instead of being silently ignored.

Written by the indexing model from the issue text.

Description

For bugs with existing features
  • Rule Id (if any, e.g. SC1000): SC1103 or SC1134
  • My shellcheck version (shellcheck --version or "online"): v0.11.0
  • The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
  • I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
$ shellcheck --rcfile=<(<<< shell=csh) /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:
shell=csh
^-- SC1103 (error): This shell type is unknown. Use e.g. sh or bash.

See

$ shellcheck - <<< '# shellcheck shell=csh'

In - line 1:
# shellcheck shell=csh
                   ^-- SC1103 (error): This shell type is unknown. Use e.g. sh or bash.

For more information:
  https://www.shellcheck.net/wiki/SC1103 -- This shell type is unknown. Use e...
$ echo $?
1
$ shellcheck -s csh /dev/null
Unknown shell: csh
$ echo $?
4
$ shellcheck --rcfile=<(<<< external-sources=1) -s sh - <<< '. foo'

In - line 1:
. foo
^-- SC1134 (error): Failed to process /proc/self/fd/12, line 1:  Fix any mentioned problems and try again.
  ^-^ SC1091 (info): Not following: foo was not specified as input (see shellcheck -x).

For more information:
  https://www.shellcheck.net/wiki/SC1134 -- Failed to process /proc/self/fd/1...
  https://www.shellcheck.net/wiki/SC1091 -- Not following: foo was not specif...
Dominant language
Haskell
Stars
40.2k
Forks
2k
Avg merge
4d 9h
Merged PRs (30d)
24

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from koalaman/shellcheck

All issues in koalaman/shellcheck

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.