Nicholas Piggin | ddfdcc3 | 2024-05-01 21:29:30 +1000 | [diff] [blame] | 1 | # shellcheck configuration file |
| 2 | external-sources=true |
| 3 | |
| 4 | # Optional extras -- https://www.shellcheck.net/wiki/Optional |
| 5 | # Possibilities, e.g., - |
| 6 | # quote‐safe‐variables |
| 7 | # require-double-brackets |
| 8 | # require-variable-braces |
| 9 | # add-default-case |
| 10 | |
| 11 | # Disable SC2004 style? I.e., |
| 12 | # In run_tests.sh line 67: |
| 13 | # if (( $unittest_run_queues <= 0 )); then |
| 14 | # ^------------------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. |
| 15 | disable=SC2004 |
| 16 | |
| 17 | # Disable SC2086 for now, double quote to prevent globbing and word |
| 18 | # splitting. There are lots of places that use it for word splitting |
| 19 | # (e.g., invoking commands with arguments) that break. Should have a |
| 20 | # more consistent approach for this (perhaps use arrays for such cases) |
| 21 | # but for now disable. |
| 22 | # SC2086 (info): Double quote to prevent globbing and word splitting. |
| 23 | disable=SC2086 |
| 24 | |
| 25 | # Disable SC2235. Most developers are used to seeing expressions |
| 26 | # like a || (b && c), not a || { b && c ; }. The subshell overhead in |
| 27 | # kvm-unit-tests is negligible as it's not shell-heavy in the first |
| 28 | # place (time is dominated by qemu startup/shutdown and test execution) |
| 29 | # SC2235 (style): Use { ..; } instead of (..) to avoid subshell overhead. |
| 30 | disable=SC2235 |