summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2012-08-02 14:36:58 -0700
committerJoe Gordon <jogo@cloudscaling.com>2012-08-08 14:53:38 -0700
commit47a1bbe3114c4e5bb84c5b050ecc9baff83375cc (patch)
tree8b1f368a4b4fc9173346be5ee79f2db097cbdb99
parent28a03d9aded97732038eadd5bbcb21282f1b246a (diff)
downloadnova-47a1bbe3114c4e5bb84c5b050ecc9baff83375cc.tar.gz
nova-47a1bbe3114c4e5bb84c5b050ecc9baff83375cc.tar.xz
nova-47a1bbe3114c4e5bb84c5b050ecc9baff83375cc.zip
Add a 50 char git title limit test to hacking.
* add N802 to hacking.py Change-Id: I8262531b4b3f8f3a1a2a37679904cf4864cae7b6
-rw-r--r--HACKING.rst3
-rwxr-xr-xtools/hacking.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/HACKING.rst b/HACKING.rst
index 85bad4d0d..8dda1e10c 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -219,7 +219,8 @@ Commit Messages
Using a common format for commit messages will help keep our git history
readable. Follow these guidelines:
- First, provide a brief summary (limited to 50 chars).
+ First, provide a brief summary (it is recommended to keep the commit title
+ under 50 chars).
The first line of the commit message should provide an accurate
description of the change, not just a reference to a bug or
diff --git a/tools/hacking.py b/tools/hacking.py
index edb06525e..4eb2141f7 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -431,6 +431,7 @@ def once_git_check_commit_title():
nova HACKING recommends not referencing a bug or blueprint in first line,
it should provide an accurate description of the change
N801
+ N802 Title limited to 50 chars
"""
#Get title of most recent commit
@@ -453,6 +454,9 @@ def once_git_check_commit_title():
print ("N801: git commit title ('%s') should provide an accurate "
"description of the change, not just a reference to a bug "
"or blueprint" % title.strip())
+ if len(title.decode('utf-8')) > 72:
+ print ("N802: git commit title ('%s') should be under 50 chars"
+ % title.strip())
if __name__ == "__main__":
#include nova path