Patchwork D637: check-code: fix incorrect capitalization in camelcase regex

login
register
mail settings
Submitter phabricator
Date Sept. 7, 2017, 2:54 p.m.
Message ID <fec28dea7e0af9fbf5ed9285ae39259d@localhost.localdomain>
Download mbox | patch
Permalink /patch/23718/
State Not Applicable
Headers show

Comments

phabricator - Sept. 7, 2017, 2:54 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGba6e14f9a2d8: check-code: fix incorrect capitalization in camelcase regex (authored by martinvonz).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D637?vs=1634&id=1662

REVISION DETAIL
  https://phab.mercurial-scm.org/D637

AFFECTED FILES
  contrib/check-code.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, quark
Cc: mercurial-devel

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -262,7 +262,7 @@ 
     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
 #    (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=',
 #     "don't use underbars in identifiers"),
-    (r'^\s+(self\.)?[A-za-z][a-z0-9]+[A-Z]\w* = ',
+    (r'^\s+(self\.)?[A-Za-z][a-z0-9]+[A-Z]\w* = ',
      "don't use camelcase in identifiers"),
     (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',
      "linebreak after :"),