contrib/check-code.py
changeset 25659 d60678a567a9
parent 25588 b40071379c5b
child 25660 328739ea70c3
equal deleted inserted replaced
25658:e93036747902 25659:d60678a567a9
   286      "missing _() in ui message (use () to hide false-positives)"),
   286      "missing _() in ui message (use () to hide false-positives)"),
   287     (r'release\(.*wlock, .*lock\)', "wrong lock release order"),
   287     (r'release\(.*wlock, .*lock\)', "wrong lock release order"),
   288     (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"),
   288     (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"),
   289     (r'os\.path\.join\(.*, *(""|\'\')\)',
   289     (r'os\.path\.join\(.*, *(""|\'\')\)',
   290      "use pathutil.normasprefix(path) instead of os.path.join(path, '')"),
   290      "use pathutil.normasprefix(path) instead of os.path.join(path, '')"),
       
   291     (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'),
   291   ],
   292   ],
   292   # warnings
   293   # warnings
   293   [
   294   [
   294     (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"),
   295     (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"),
   295   ]
   296   ]