comparison contrib/check-commit @ 24703:868cec6409c4

check-commit: be more picky about detection of wrong bug tag The check-commit script search for "bug" withing bracket and ask people to use (issueXXXX) instead. The test was too wide and matching any "(+b+u+g"sequence.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sun, 12 Apr 2015 14:54:53 -0400
parents ba272156113f
children 85fc79707cb2
comparison
equal deleted inserted replaced
24702:2b0449255800 24703:868cec6409c4
18 import re, sys, os 18 import re, sys, os
19 19
20 errors = [ 20 errors = [
21 (r"[(]bc[)]", "(BC) needs to be uppercase"), 21 (r"[(]bc[)]", "(BC) needs to be uppercase"),
22 (r"[(]issue \d\d\d", "no space allowed between issue and number"), 22 (r"[(]issue \d\d\d", "no space allowed between issue and number"),
23 (r"[(]bug", "use (issueDDDD) instead of bug"), 23 (r"[(]bug(\d|\s)", "use (issueDDDD) instead of bug"),
24 (r"^# User [^@\n]+$", "username is not an email address"), 24 (r"^# User [^@\n]+$", "username is not an email address"),
25 (r"^# .*\n(?!merge with )[^#]\S+[^:] ", 25 (r"^# .*\n(?!merge with )[^#]\S+[^:] ",
26 "summary line doesn't start with 'topic: '"), 26 "summary line doesn't start with 'topic: '"),
27 (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"), 27 (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"),
28 (r"^# .*\n[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"), 28 (r"^# .*\n[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"),