]> code.ossystems Code Review - openembedded-core.git/commitdiff
create-pull-request: detect trailing white space
authorNitin A Kamble <nitin.a.kamble@intel.com>
Tue, 11 Dec 2012 17:28:03 +0000 (09:28 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 13 Dec 2012 14:28:40 +0000 (14:28 +0000)
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 <nitin.a.kamble@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts/create-pull-request

index 9a8913db72bbb7443e9d454d9fb6199b3be58e07..9692bf1665b8317c1919fa73eceae36e7e3b754a 100755 (executable)
@@ -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