-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config file location #3107
Comments
The man states
To answer the questions then:
No it will not find that file. If you can place it in (Please also note the special care needed by people using snaps and docker and such, it's in the man file as well.) brother /tmp$ cat $XDG_CONFIG_HOME/shellcheck/shellcheckrc
enable=require-double-brackets
brother /tmp$ shellcheck test.sh
In test.sh line 3:
if [ $1 ]; then
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$1" ]; then
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
brother /tmp$ mv $XDG_CONFIG_HOME/shellcheck/shellcheckrc $XDG_CONFIG_HOME/.shellcheckrc
brother /tmp$ shellcheck test.sh
In test.sh line 3:
if [ $1 ]; then
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$1" ]; then
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
brother /tmp$ shellcheck --rcfile=$XDG_CONFIG_HOME/.shellcheckrc test.sh
In test.sh line 3:
if [ $1 ]; then
^----^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [[ "$1" ]]; then
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
https://www.shellcheck.net/wiki/SC2292 -- Prefer [[ ]] over [ ] for tests i... If no mistakes can be pointed out here I think this should be treated as a bug, at least between documentation and behavior =)
It is supposed to respect the environment set. |
Hi, I'm looking for clarification after consulting shellcheck's man:
$XDG_CONFIG_HOME/shellcheck/shellcheckrc
?Thanks
The text was updated successfully, but these errors were encountered: