]> granicus.if.org Git - zfs/commitdiff
Prevent commitcheck.sh from running twice
authorGiuseppe Di Natale <dinatale2@users.noreply.github.com>
Mon, 3 Apr 2017 21:20:01 +0000 (14:20 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 3 Apr 2017 21:20:01 +0000 (14:20 -0700)
A stray semicolon was causing commitcheck.sh
to run twice when running make checkstyle.
Updated regexes for matching tagged lines.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #5952

Makefile.am
scripts/commitcheck.sh

index cea264acf273d7013baa06bbcb95cc46439d4c15..5545cd67328e6736ceb7c817195470b8355f14f6 100644 (file)
@@ -55,7 +55,7 @@ shellcheck:
                shellcheck --exclude=SC1090 --format gcc scripts/paxcheck.sh \
                        scripts/zloop.sh \
                        scripts/zfs-tests.sh \
-                       scripts/zfs.sh; \
+                       scripts/zfs.sh \
                        scripts/commitcheck.sh; \
                (find cmd/zed/zed.d/*.sh -type f) | \
                 grep -v 'zfs-script-config' | \
index 723109112b60028bd71246a104e21fffaca80b1c..5bef3375d9f7cf877fc32876149172e85db1f370 100755 (executable)
@@ -11,12 +11,14 @@ function test_url()
         echo "\"$url\" is unreachable"
         return 1
     fi
+
+    return 0
 }
 
 # check for a tagged line
 function check_tagged_line()
 {
-    regex='^\s*'"$1"':\s+\S+\s+\<\S+\>'
+    regex='^\s*'"$1"':\s[[:print:]]+\s<[[:graph:]]+>$'
     foundline=$(git log -n 1 "$REF" | egrep -m 1 "$regex")
     if [ -z "$foundline" ]; then
         echo "error: missing \"$1\""
@@ -29,7 +31,7 @@ function check_tagged_line()
 # check for a tagged line and check that the link is valid
 function check_tagged_line_with_url ()
 {
-    regex='^\s*'"$1"':\s+\K(\S+)'
+    regex='^\s*'"$1"':\s\K([[:graph:]]+)$'
     foundline=$(git log -n 1 "$REF" | grep -Po "$regex")
     if [ -z "$foundline" ]; then
         echo "error: missing \"$1\""