mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
scripts: Fix shellcheck warnings for checkpatch scripts
- Switching from 'set -e' to 'set -euo pipefail' for better error handling.
- Quoting all variable expansions to prevent word splitting and globbing.
- Replacing legacy unquoted $(...) and $@ with quoted forms.
- Using array-safe idioms where necessary (e.g., "${src_files[@]}").
This patch doesn't change any functionality.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -euo pipefail
|
||||
|
||||
scriptpath=${CHECKPATCH_PATH:-/lib/modules/$(uname -r)/build/scripts}
|
||||
scriptpath="${CHECKPATCH_PATH:-/lib/modules/$(uname -r)/build/scripts}"
|
||||
|
||||
ignore=(
|
||||
MISSING_SIGN_OFF
|
||||
@@ -20,6 +20,6 @@ ignore=(
|
||||
MACRO_ARG_REUSE
|
||||
IF_0
|
||||
)
|
||||
ignore_str=${ignore[*]}
|
||||
ignore_str="${ignore[*]}"
|
||||
|
||||
${scriptpath}/checkpatch.pl --no-tree --show-types --strict --ignore="${ignore_str// /,}" $@
|
||||
"${scriptpath}/checkpatch.pl" --no-tree --show-types --strict --ignore="${ignore_str// /,}" "$@"
|
||||
|
||||
Reference in New Issue
Block a user