summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2017-04-03 14:20:01 -0700
committerBrian Behlendorf <[email protected]>2017-04-03 14:20:01 -0700
commit3f2da6cb739f9d288f81abebb0f4bf94d266075d (patch)
tree5275abf02babb2c6c5cabca3f495b5a3360d80bd /scripts
parente55ebf6afdebec0e48c49ba912e02166bd6a3bc9 (diff)
Prevent commitcheck.sh from running twice
A stray semicolon was causing commitcheck.sh to run twice when running make checkstyle. Updated regexes for matching tagged lines. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #5952
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/commitcheck.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/commitcheck.sh b/scripts/commitcheck.sh
index 723109112..5bef3375d 100755
--- a/scripts/commitcheck.sh
+++ b/scripts/commitcheck.sh
@@ -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\""