.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
This commit is contained in:
nl6720 2022-12-03 11:33:21 +02:00
parent bf79d7be9e
commit 40dbfcfaf0
No known key found for this signature in database
GPG key ID: 5CE88535E188D369

11
.shellcheckrc Normal file
View file

@ -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