# HG changeset patch # User Martin von Zweigbergk # Date 1504711374 25200 # Node ID ba6e14f9a2d83c21049a83b05f6b4aba8799eac0 # Parent 5dc6ac6555e63522f6804ffebfe4b3398a9d54f2 check-code: fix incorrect capitalization in camelcase regex This was found internally at Google as part of a monorepo-wide cleanup. Differential Revision: https://phab.mercurial-scm.org/D637 diff -r 5dc6ac6555e6 -r ba6e14f9a2d8 contrib/check-code.py --- a/contrib/check-code.py Wed Sep 06 10:41:13 2017 -0700 +++ b/contrib/check-code.py Wed Sep 06 08:22:54 2017 -0700 @@ -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 :"),