Skip to content

Commit 4c8449d

Browse files
matttbekuba-moo
authored andcommitted
tests: shellcheck: restrict warnings to warnings only
And not lower severities like info and style. For the moment, there are too many info messages, e.g. not using double quotes everywhere or having functions that are not directly called. Let's not push people to fix those and create massive cleanup patches not fixing actual problems. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 238e7a9 commit 4c8449d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/patch/shellcheck/shellcheck.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ for f in $(git show --diff-filter=M --pretty="" --name-only "${HEAD}" | grep -E
4040
)
4141
done
4242

43-
incumbent=$(grep -i -c "(error)" $tmpfile_o)
44-
incumbent_w=$(grep -i -c "SC[0-9]* (" $tmpfile_o)
43+
# ex: SC3045 (warning): In POSIX sh, printf -v is undefined.
44+
# severity: error, warning, info, style
45+
incumbent=$(grep -c " (error):" $tmpfile_o)
46+
incumbent_w=$(grep -c " (warning):" $tmpfile_o)
4547

4648
pr "Building the tree with the patch"
4749
git checkout -q $HEAD
@@ -57,8 +59,9 @@ for f in $(git show --diff-filter=AM --pretty="" --name-only "${HEAD}" | grep -E
5759
)
5860
done
5961

60-
current=$(grep -i -c "(error)" $tmpfile_n)
61-
current_w=$(grep -i -c "SC[0-9]* (" $tmpfile_n)
62+
# severity: error, warning, info, style
63+
current=$(grep -c " (error):" $tmpfile_n)
64+
current_w=$(grep -c " (warning):" $tmpfile_n)
6265

6366
echo "Errors before: $incumbent (+warn: $incumbent_w) this patch: $current (+warn: $current_w)" >&$DESC_FD
6467

0 commit comments

Comments
 (0)