-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.shellcheckrc
29 lines (23 loc) · 943 Bytes
/
.shellcheckrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
source-path=./lib
source-path=SCRIPTDIR
# Set to true in .shellcheckrc to always allow ShellCheck to open arbitrary
# files from 'source' statements (the way most tools do).
# This option defaults to false only due to ShellCheck's origin as a remote
# service for checking untrusted scripts. It can safely be enabled for normal
# development.
external-sources=true
# name: avoid-nullary-conditions
# desc: Suggest explicitly using -n in `[ $var ]`
# example: [ "$var" ]
# fix: [ -n "$var" ]
enable=avoid-nullary-conditions
# name: require-double-brackets
# desc: Require [[ and warn about [ in Bash/Ksh
# example: [ -e /etc/issue ]
# fix: [[ -e /etc/issue ]]
enable=require-double-brackets
# name: add-default-case
# desc: Suggest adding a default case in `case` statements
# example: case $? in 0) echo 'Success';; esac
# fix: case $? in 0) echo 'Success';; *) echo 'Fail' ;; esac
enable=add-default-case