-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.shellcheckrc
More file actions
45 lines (42 loc) · 2.68 KB
/
.shellcheckrc
File metadata and controls
45 lines (42 loc) · 2.68 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
# ShellCheck configuration for oudbase project
# Only fail on errors, not info/style/warnings for gradual improvement
# This helps maintain code quality while allowing gradual improvements
# Disable specific checks that are common in this codebase
# SC1090: Can't follow non-constant source
# SC1091: Not following sourced files (acceptable - files may not exist at check time)
# SC2001: See if you can use ${variable//search/replace}
# SC2004: $/${} is unnecessary on arithmetic variables
# SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'
# SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop
# SC2015: Note that A && B || C is not if-then-else
# SC2016: Expressions don't expand in single quotes (acceptable - intentional in some cases)
# SC2026: This word is outside of quotes
# SC2027: The surrounding quotes actually unquote this
# SC2034: Variable appears unused (acceptable - may be exported or used externally)
# SC2044: For loops over find output are fragile
# SC2046: Quote this to prevent word splitting
# SC2048: Use "$@" (with quotes) to prevent whitespace problems
# SC2059: Don't use variables in the printf format string
# SC2064: Use single quotes, otherwise this expands now
# SC2086: Double quote to prevent globbing (we'll fix critical instances gradually)
# SC2103: Use a ( subshell ) to avoid having to cd back
# SC2115: Use "${var:?}" to ensure this never expands to /
# SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'
# SC2124: Assigning an array to a string
# SC2126: Consider using grep -c instead of grep|wc -l
# SC2129: Consider using { cmd1; cmd2; } >> file
# SC2153: Possible misspelling (acceptable - variables may be from sourced files)
# SC2154: Variable is referenced but not assigned
# SC2155: Declare and assign separately to avoid masking return values
# SC2162: read without -r will mangle backslashes
# SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails
# SC2181: Check exit code directly with e.g. 'if mycmd;'
# SC2196: egrep is non-standard and deprecated. Use grep -E instead
# SC2206: Quote to prevent word splitting/globbing
# SC2207: Prefer mapfile or read -a to split command output
# SC2231: Quote expansions in this for loop glob
# SC2269: This variable is assigned to itself
# SC2295: Expansions inside ${..} need to be quoted separately
# SC2317: Command appears to be unreachable
disable=SC1090,SC1091,SC2001,SC2004,SC2005,SC2013,SC2015,SC2016,SC2026,SC2027,SC2034,SC2044,SC2046,SC2048,SC2059,SC2064,SC2069,SC2086,SC2103,SC2115,SC2116,SC2124,SC2126,SC2129,SC2153,SC2154,SC2155,SC2162,SC2164,SC2181,SC2196,SC2206,SC2207,SC2231,SC2269,SC2295,SC2317
# Note: Consider re-enabling these over time as code is refactored