You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by se...@apache.org on 2016/03/21 16:33:39 UTC

yetus git commit: YETUS-306. author tag detector should produce a file with pointers to incidence

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 <bu...@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 <se...@apache.org>
Authored: Mon Feb 22 00:12:57 2016 +0900
Committer: Kengo Seki <se...@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
+}