Skip to contentSkip to conversation

a commit for detecting trailing whitespace

PATCH New [email protected] 1 participant 2 messages Dec 11, 2012

lore
Share & tools
lore
#0 lore raw

v2 cover a commit for detecting trailing whitespace

From: Nitin A Kamble <[email protected]>

This v2 commit makes the egrep's output colorful with the --color option, and output is made silent when the patches are clean wrt trailing white space.

Detecting of the mixed white space was discussed on the mailing list, but
the discussion did not reach to a final agreement, so this commit is not adding that detection yet.

Thanks,
Nitin

The following changes since commit c607095894cab60493ddfc4b967b0325e1c313b4:

bitbake: Revert "BBHandler: Ensure parser state engine is correctly reset for new parsing" (2012-12-07 18:09:01 +0000)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib nitin/misc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
create-pull-request: detect trailing white space

 scripts/create-pull-request |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH v2 1/1 create-pull-request: detect trailing white space

From: Nitin A Kamble <[email protected]>

Add logic in the create-pull-request to detect and warn about the trailing white space inserted by patches.

---
 scripts/create-pull-request |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
scripts/create-pull-request +8 -0
index 9a8913d..9692bf1 100755
@@ -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
Signature · 1 line
1.7.3.4