comparison contrib/check-code.py @ 10702:1437542a9fd7

check-code: add check for any/all
author Matt Mackall <mpm@selenic.com>
date Fri, 12 Mar 2010 16:16:47 -0600
parents 95c7c4b7e67a
children 4eaf1b746499
comparison
equal deleted inserted replaced
10700:b2b71c304de0 10702:1437542a9fd7
81 # (r'in range\(', "use xrange"), 81 # (r'in range\(', "use xrange"),
82 # (r'^\s*print\s+', "avoid using print in core and extensions"), 82 # (r'^\s*print\s+', "avoid using print in core and extensions"),
83 (r'[\x80-\xff]', "non-ASCII character literal"), 83 (r'[\x80-\xff]', "non-ASCII character literal"),
84 (r'("\')\.format\(', "str.format() not available in Python 2.4"), 84 (r'("\')\.format\(', "str.format() not available in Python 2.4"),
85 (r'^\s*with\s+', "with not available in Python 2.4"), 85 (r'^\s*with\s+', "with not available in Python 2.4"),
86 (r'^\s*(any|all)\(', "any/all not available in Python 2.4"),
86 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), 87 (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
87 (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"), 88 (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"),
88 # (r'\s\s=', "gratuitous whitespace before ="), 89 # (r'\s\s=', "gratuitous whitespace before ="),
89 (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator"), 90 (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator"),
90 (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\s', "missing whitespace around operator"), 91 (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\s', "missing whitespace around operator"),