From 3e35310db3cd6d265092724a0e542b9616aca9c5 Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Tue, 11 Dec 2012 09:28:03 -0800 Subject: create-pull-request: detect trailing white space Add logic in the create-pull-request to detect and warn about the trailing white space inserted by patches. Signed-off-by: Nitin A Kamble Signed-off-by: Saul Wold --- scripts/create-pull-request | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/create-pull-request') diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 9a8913db72..9692bf1665 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request @@ -229,3 +229,11 @@ Review their content, especially the summary mail: When you are satisfied, you can send them with: send-pull-request -a -p $ODIR EOM + +# Check the patches for trailing white space +egrep -q -e "^\+.*\s+$" $ODIR/* +if [ $? -ne 1 ]; then + echo + echo "WARNING: Trailing white space detected at these locations" + egrep -nH --color -e "^\+.*\s+$" $ODIR/* +fi -- cgit 1.2.3-korg