aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/commitcheck.sh
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-05-14 11:55:17 +0200
committerBrian Behlendorf <[email protected]>2021-06-08 14:45:03 -0700
commit59d91b4d10bac7597cb21394080b3f33b84e184a (patch)
treecb36445604228978f12ca96ec3607bb86eea8006 /scripts/commitcheck.sh
parentd53a6969c106cc06a8064dabc3161364e7e04ba9 (diff)
Fix SC2181 ("[ $?") outside tests/
Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12042
Diffstat (limited to 'scripts/commitcheck.sh')
-rwxr-xr-xscripts/commitcheck.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/commitcheck.sh b/scripts/commitcheck.sh
index 71cf52166..0077eb6b0 100755
--- a/scripts/commitcheck.sh
+++ b/scripts/commitcheck.sh
@@ -87,9 +87,7 @@ coverity_fix_commit()
IFS='
'
for line in $(git log -n 1 --pretty=%b "$REF" | grep -E '^CID'); do
- echo "$line" | grep -E '^CID [[:digit:]]+: ([[:graph:]]+|[[:space:]])+ \(([[:upper:]]|\_)+\)' > /dev/null
- # shellcheck disable=SC2181
- if [ $? -ne 0 ]; then
+ if ! echo "$line" | grep -qE '^CID [[:digit:]]+: ([[:graph:]]+|[[:space:]])+ \(([[:upper:]]|\_)+\)'; then
echo "error: commit message has an improperly formatted CID defect line"
error=1
fi