.shellcheckrc: shell=unknown directive is silently ignored
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
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 --versionor "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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from koalaman/shellcheck
-
shellcheck silently ignores --enable=unknown optionPossibly taken @eyadstein claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
koalaman/shellcheck#3593 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
koalaman/shellcheck#3465 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
koalaman/shellcheck#3603 ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
koalaman/shellcheck#3602 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
koalaman/shellcheck#3600 ·
Maintainers usually reply within 3 days
All issues in koalaman/shellcheck
Similar issues
-
`unsafeReleaseAll` throws `ResourceRegistryUsedFromUntrackedThread` when called from an untracked threadPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
CLI Console from CDN: Raw SQL always creates a migration, ignoring "This is a migration" checkboxOpenk/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
hasura/graphql-engine#10897 · 2 comments · 1 reaction ·
Maintainers usually reply within 2 days
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Vim-mode indent crashes: monaco-vim's browser build inlines monaco-editor 0.33Possibly taken @x-labb claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
compiler-explorer/compiler-explorer#9402 ·
Maintainers usually reply within 1 day