From 7f47038026ac39e11e2aa3ada7d33c78e25ae16a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Fri, 9 Dec 2022 18:22:27 +0100 Subject: [PATCH] scripts: lint-sh: ignore POSIX string replacement warnings [SC3060] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/lint-sh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lint-sh.sh b/scripts/lint-sh.sh index 96335c7a..3eae78ab 100755 --- a/scripts/lint-sh.sh +++ b/scripts/lint-sh.sh @@ -17,7 +17,7 @@ find package -type f | while read -r file; do is_scriptfile "$file" || continue 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 find scripts -type f | while read -r file; do