Commit d9933fad authored by Leo's avatar Leo

refactor(apkbuild-lint): disable linting of SC2039 where local is used

local operator is accepted by busybox's ash (the one that matters) and
dash (the one that doesn't matter the least)
parent d7fe6069
Pipeline #15926 passed with stage
in 26 seconds
......@@ -11,6 +11,8 @@
export LC_ALL=C
scan() {
# shellcheck disable=2039
# 2039: local operator is not posix but we can use it in ash/dash
local rx="$1" msg="$2" tag="$3" severity="$4"
grep -P -Hn -e "$rx" "$apkbuild" |
sed "s/^\([^:]*:[^:]*:\)\(.*\)/$severity:[$tag]:\1$msg/"
......@@ -177,7 +179,9 @@ newline_opening_brace() {
superfluous_cd_builddir() {
[ "$SKIP_SUPERFLUOUS_CD_BUILDDIR" ] && return 0
[ "$SKIP_AL13" ] && return 0
local cds= cdscount= prevcd= phase="$1"
# shellcheck disable=2039
# 2039: local operator is not posix but we can use it in ash/dash
local cds='' cdscount='' prevcd='' phase="$1"
# All ocurrences of the 'cd' command being used
# 1. Print file with line numbers.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment