Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/.shellcheckrc
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2022-12-03 11:33:21 +0200
committernl6720 <nl6720@gmail.com>2023-06-15 15:12:28 +0300
commit40dbfcfaf0a06a5c8e92a1d5183d8ae4e4634835 (patch)
tree0d90dcdf1a7a57df14e8312925f718b9db4e61b3 /.shellcheckrc
parentbf79d7be9ec51c061b5fcca3b36a7da3423fc154 (diff)
.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
Diffstat (limited to '.shellcheckrc')
-rw-r--r--.shellcheckrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/.shellcheckrc b/.shellcheckrc
new file mode 100644
index 0000000..75aca74
--- /dev/null
+++ b/.shellcheckrc
@@ -0,0 +1,11 @@
+# Suggest explicitly using -n in `[ $var ]`
+enable=avoid-nullary-conditions
+
+# Suggest 'command -v' instead of 'which'
+enable=deprecate-which
+
+# Suggest quoting variables without metacharacters
+enable=quote-safe-variables
+
+# Require [[ and warn about [ in Bash/Ksh
+enable=require-double-brackets