-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.shellcheckrc
More file actions
49 lines (34 loc) · 1.42 KB
/
.shellcheckrc
File metadata and controls
49 lines (34 loc) · 1.42 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Specify the default shell for ShellCheck to analyze scripts
shell=bash
# Allow sourcing files not explicitly passed to ShellCheck
external-sources=true
source-path=SCRIPTDIR
# Enable specific style and best practice recommendations
# Suggest adding a default case in `case` statements
enable=add-default-case
# https://github.com/koalaman/shellcheck/wiki/SC2244
enable=avoid-nullary-conditions
# Suggest explicitly using -n in `[ $var ]`
enable=avoid-nullary-conditions
# Notify when 'set -e' is suppressed during function invocation
enable=check-set-e-suppressed
# Warn about uppercase variables that are unassigned
enable=check-unassigned-uppercase
# Suggest using 'command -v' instead of 'which' for portability
enable=deprecate-which
# Suggest quoting variables that don't contain metacharacters
enable=quote-safe-variables
# Recommend ${VAR} in place of $VAR for variable clarity
enable=require-variable-braces
# Require [[ over [ for Bash/Ksh scripts
enable=require-double-brackets
# Additional rules
enable=SC2035 # Warn against .* in commands like rm
enable=SC2148 # Ensure valid shebang
enable=SC2231 # Warn about loop condition issues
# Disable specific warnings
disable=SC1090 # Allow sourcing dynamic/non-constant files
disable=SC1091 # Allow sourcing files that may not exist
disable=SC2034 # Allow unused variables
disable=SC2181 # Allow $? exit code checks
disable=SC2154 # Allow unassigned variable warnings