comparison contrib/check-code.py @ 17957:fbe43efe4a53

check-code: move i18n check from warning to error
author Matt Mackall <mpm@selenic.com>
date Sun, 25 Nov 2012 13:57:00 -0600
parents cf204e9829f4
children b35e3364f94a
comparison
equal deleted inserted replaced
17956:a08775ec89f2 17957:fbe43efe4a53
209 (r'(?i)descendent', "the proper spelling is descendAnt"), 209 (r'(?i)descendent', "the proper spelling is descendAnt"),
210 (r'\.debug\(\_', "don't mark debug messages for translation"), 210 (r'\.debug\(\_', "don't mark debug messages for translation"),
211 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"), 211 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"),
212 (r'^\s*except\s*:', "warning: naked except clause", r'#.*re-raises'), 212 (r'^\s*except\s*:', "warning: naked except clause", r'#.*re-raises'),
213 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"), 213 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"),
214 ],
215 # warnings
216 [
217 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', 214 (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
218 "warning: unwrapped ui message"), 215 "missing _() in ui message (use () to hide false-positives)"),
216 ],
217 # warnings
218 [
219 ] 219 ]
220 ] 220 ]
221 221
222 pyfilters = [ 222 pyfilters = [
223 (r"""(?msx)(?P<comment>\#.*?$)| 223 (r"""(?msx)(?P<comment>\#.*?$)|