##// END OF EJS Templates
check-code: do not prepend "warning" to a failure message...
Simon Heimberg -
r18762:a91387a3 default
parent child Browse files
Show More
@@ -216,7 +216,7 b' pypats = ['
216 (r'(?i)descendent', "the proper spelling is descendAnt"),
216 (r'(?i)descendent', "the proper spelling is descendAnt"),
217 (r'\.debug\(\_', "don't mark debug messages for translation"),
217 (r'\.debug\(\_', "don't mark debug messages for translation"),
218 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"),
218 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"),
219 (r'^\s*except\s*:', "warning: naked except clause", r'#.*re-raises'),
219 (r'^\s*except\s*:', "naked except clause", r'#.*re-raises'),
220 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"),
220 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"),
221 (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
221 (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
222 "missing _() in ui message (use () to hide false-positives)"),
222 "missing _() in ui message (use () to hide false-positives)"),
@@ -163,13 +163,13 b''
163 object comparison with literal
163 object comparison with literal
164 [1]
164 [1]
165
165
166 $ cat > warning.py <<EOF
166 $ cat > for-nolineno.py <<EOF
167 > except:
167 > except:
168 > EOF
168 > EOF
169 $ "$check_code" warning.py --warning --nolineno
169 $ "$check_code" for-nolineno.py --nolineno
170 warning.py:0:
170 for-nolineno.py:0:
171 > except:
171 > except:
172 warning: naked except clause
172 naked except clause
173 [1]
173 [1]
174
174
175 $ cat > raise-format.py <<EOF
175 $ cat > raise-format.py <<EOF
General Comments 0
You need to be logged in to leave comments. Login now