Skip to content

Commit 40dbfcf

Browse files
committed
.shellcheckrc: enable optional checks
* Suggest explicitly using -n in `[ $var ]`. https://www.shellcheck.net/wiki/SC2243 & https://www.shellcheck.net/wiki/SC2244 * Suggest 'command -v' instead of 'which'. https://www.shellcheck.net/wiki/SC2230 * Suggest quoting variables without metacharacters. https://www.shellcheck.net/wiki/SC2248 * Require [[ and warn about [ in Bash/Ksh. https://www.shellcheck.net/wiki/SC2292
1 parent bf79d7b commit 40dbfcf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.shellcheckrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Suggest explicitly using -n in `[ $var ]`
2+
enable=avoid-nullary-conditions
3+
4+
# Suggest 'command -v' instead of 'which'
5+
enable=deprecate-which
6+
7+
# Suggest quoting variables without metacharacters
8+
enable=quote-safe-variables
9+
10+
# Require [[ and warn about [ in Bash/Ksh
11+
enable=require-double-brackets

0 commit comments

Comments
 (0)