From patchwork Tue Dec 11 17:28:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2,1/1] create-pull-request: detect trailing white space Date: Tue, 11 Dec 2012 17:28:03 -0000 From: Nitin A Kamble X-Patchwork-Id: 40769 Message-Id: To: Openembedded-core@lists.openembedded.org, daniel@fooishbar.org, martin.jansa@gmail.com, richard.purdie@linuxfoundation.org From: Nitin A Kamble 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 --- scripts/create-pull-request | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 9a8913d..9692bf1 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