Patchwork [1,of,2] check-commit: be more picky about detection of wrong bug tag

login
register
mail settings
Submitter Pierre-Yves David
Date April 13, 2015, 5:28 p.m.
Message ID <55c24d69aea7ec2690de.1428946115@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/8632/
State Accepted
Headers show

Comments

Pierre-Yves David - April 13, 2015, 5:28 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1428864893 14400
#      Sun Apr 12 14:54:53 2015 -0400
# Node ID 55c24d69aea7ec2690dee8ff0111112c85d8dfaa
# Parent  52ff737c63d2b2cb41185549aa9c35bc47317032
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 to wide and matching any "(+b+u+g"sequence.

Patch

diff --git a/contrib/check-commit b/contrib/check-commit
--- a/contrib/check-commit
+++ b/contrib/check-commit
@@ -18,11 +18,11 @@ 
 import re, sys, os
 
 errors = [
     (r"[(]bc[)]", "(BC) needs to be uppercase"),
     (r"[(]issue \d\d\d", "no space allowed between issue and number"),
-    (r"[(]bug", "use (issueDDDD) instead of bug"),
+    (r"[(]bug(\d|\s)", "use (issueDDDD) instead of bug"),
     (r"^# User [^@\n]+$", "username is not an email address"),
     (r"^# .*\n(?!merge with )[^#]\S+[^:] ",
      "summary line doesn't start with 'topic: '"),
     (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"),
     (r"^# .*\n[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"),