[dpdk-dev,1/3] scripts: check spacing after commit references

Message ID 1467801530-20800-2-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Thomas Monjalon July 6, 2016, 10:38 a.m. UTC
  A blank line between "Fixes" and "Signed-off-by" helps to
separate information in blocks.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 scripts/check-git-log.sh | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh
index c7fc0e4..a24f101 100755
--- a/scripts/check-git-log.sh
+++ b/scripts/check-git-log.sh
@@ -129,6 +129,12 @@  bad=$(echo "$tags" |
 	sed 's,^.,\t&,')
 [ -z "$bad" ] || printf "Wrong tag:\n$bad\n"
 
+# check blank line after last Fixes: tag
+bad=$(echo "$bodylines" |
+	sed -n 'N;/\nFixes:/D;/\n$/D;/^Fixes:/P' |
+	sed 's,^.,\t&,')
+[ -z "$bad" ] || printf "Missing blank line after 'Fixes' tag:\n$bad\n"
+
 # check missing Fixes: tag
 bad=$(for fix in $fixes ; do
 	git log --format='%b' -1 $fix | grep -q '^Fixes: ' ||