yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sek...@apache.org
Subject yetus git commit: YETUS-306. author tag detector should produce a file with pointers to incidence
Date Mon, 21 Mar 2016 15:33:39 GMT
Repository: yetus
Updated Branches:
  refs/heads/master 7b83fd81e -> 49a6b0c5c


YETUS-306. author tag detector should produce a file with pointers to incidence

Signed-off-by: Sean Busbey <busbey@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/49a6b0c5
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/49a6b0c5
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/49a6b0c5

Branch: refs/heads/master
Commit: 49a6b0c5c145c4d7ec90edc11f75fbcf99181de2
Parents: 7b83fd8
Author: Kengo Seki <sekikn@apache.org>
Authored: Mon Feb 22 00:12:57 2016 +0900
Committer: Kengo Seki <sekikn@apache.org>
Committed: Tue Mar 22 00:33:02 2016 +0900

----------------------------------------------------------------------
 precommit/test-patch.d/author.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/49a6b0c5/precommit/test-patch.d/author.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/author.sh b/precommit/test-patch.d/author.sh
index d456bbb..19b4dee 100755
--- a/precommit/test-patch.d/author.sh
+++ b/precommit/test-patch.d/author.sh
@@ -39,14 +39,17 @@ function author_patchfile
     return 0
   fi
 
-  authorTags=$("${GREP}" -c -i '^[^-].*@author' "${patchfile}")
+  ${GREP} -i -n '^[^-].*@author' "${patchfile}" >> "${PATCH_DIR}/author-tags.txt"
+  # shellcheck disable=SC2016
+  authorTags=$(wc -l "${PATCH_DIR}/author-tags.txt" | "${AWK}" '{print $1}')
   echo "There appear to be ${authorTags} @author tags in the patch."
   if [[ ${authorTags} != 0 ]] ; then
     add_vote_table -1 @author \
       "The patch appears to contain ${authorTags} @author tags which the" \
       " community has agreed to not allow in code contributions."
+    add_footer_table @author "@@BASE@@/author-tags.txt"
     return 1
   fi
   add_vote_table +1 @author "The patch does not contain any @author tags."
   return 0
-}
\ No newline at end of file
+}


Mime
View raw message