From 804cf21206f68282d27b1989e8938c57dfd60df1 Mon Sep 17 00:00:00 2001 From: Greg Tucker Date: Fri, 15 Jun 2018 16:45:02 -0700 Subject: [PATCH] test: Check for sign-off and format in more files Change-Id: Id780756a6fb201b22fc3ac1a67955ed61b436e8d Signed-off-by: Greg Tucker --- tools/check_format.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/check_format.sh b/tools/check_format.sh index de841be..ffb47ae 100755 --- a/tools/check_format.sh +++ b/tools/check_format.sh @@ -41,7 +41,7 @@ fi if hash grep; then echo "Checking for dos and whitespace violations..." - for f in `git ls-files '*.c' '*.h' '*.asm' '*.inc' '*.am' '*.txt' '*.md' `; do + for f in `git ls-files '*.c' '*.h' '*.asm' '*.inc' '*.am' '*.txt' '*.md' '*.def' '*.ac' '*.sh' '*.in' 'Makefile*' `; do [ "$verbose" -gt 0 ] 2> /dev/null && echo "checking $f" if grep -q '[[:space:]]$' $f ; then echo " File found with trailing whitespace: $f" @@ -54,6 +54,12 @@ if hash grep; then done fi +echo "Checking for signoff in commit message..." +if ! git log -n 1 --format=%B | grep -q "^Signed-off-by:" ; then + echo " Commit not signed off. Please read src/CONTRIBUTING.md" + rc=1 +fi + [ "$rc" -gt 0 ] && echo Format Fail || echo Format Pass exit $rc