comparison contrib/check-code.py @ 16704:1f3acc30bdfe

check-code: improve detection of naked except clauses
author Brodie Rao <brodie@sf.io>
date Sun, 13 May 2012 13:17:50 +0200
parents 1751d96d324f
children c2d9ef43ff6c
comparison
equal deleted inserted replaced
16703:7292a4618f46 16704:1f3acc30bdfe
204 (r'\.debug\(\_', "don't mark debug messages for translation"), 204 (r'\.debug\(\_', "don't mark debug messages for translation"),
205 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"), 205 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"),
206 ], 206 ],
207 # warnings 207 # warnings
208 [ 208 [
209 (r'^\s*except:$', "warning: naked except clause"), 209 (r'^\s*except\s*:', "warning: naked except clause"),
210 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', 210 (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
211 "warning: unwrapped ui message"), 211 "warning: unwrapped ui message"),
212 ] 212 ]
213 ] 213 ]
214 214