scripts: lint-sh: ignore POSIX string replacement warnings [SC3060]

This ignores the following warning:

  warning: In POSIX sh, string replacement is undefined. [SC3060]

As string replacements are supported by ash and we are only going to use
ash.

This allows us to use something short like ${QUERY_STRING//+/ } to
replace all '+' to a whitespace in an URL or to make an ${IFNAME//-/_}
UCI compatible in the future, for example. Instead of needing to use
something long like "echo ${IFNAME} | tr '-' '_'.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
This commit is contained in:
Linus Lüssing 2022-12-09 18:22:27 +01:00
parent eee89bf3a9
commit 7f47038026

View File

@ -17,7 +17,7 @@ find package -type f | while read -r file; do
is_scriptfile "$file" || continue is_scriptfile "$file" || continue
echo "Checking $file" echo "Checking $file"
shellcheck -f gcc -x -s sh -e SC2039,SC1091,SC2155,SC2034,SC3043,SC3037,SC3057 "$file" shellcheck -f gcc -x -s sh -e SC2039,SC1091,SC2155,SC2034,SC3043,SC3037,SC3057,SC3060 "$file"
done done
find scripts -type f | while read -r file; do find scripts -type f | while read -r file; do