Mercurial > public > mercurial-scm > hg-stable
comparison contrib/check-code.py @ 17299:e51d4aedace9 stable
check-code: indent 4 spaces in py files
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 31 Jul 2012 03:30:42 +0200 |
parents | 5f131ae05905 |
children | 4f8054d3171b |
comparison
equal
deleted
inserted
replaced
17298:59c14bf5a48c | 17299:e51d4aedace9 |
---|---|
204 "always assign an opened file to a variable, and close it afterwards"), | 204 "always assign an opened file to a variable, and close it afterwards"), |
205 (r'(?i)descendent', "the proper spelling is descendAnt"), | 205 (r'(?i)descendent', "the proper spelling is descendAnt"), |
206 (r'\.debug\(\_', "don't mark debug messages for translation"), | 206 (r'\.debug\(\_', "don't mark debug messages for translation"), |
207 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"), | 207 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"), |
208 (r'^\s*except\s*:', "warning: naked except clause", r'#.*re-raises'), | 208 (r'^\s*except\s*:', "warning: naked except clause", r'#.*re-raises'), |
209 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"), | |
209 ], | 210 ], |
210 # warnings | 211 # warnings |
211 [ | 212 [ |
212 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', | 213 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', |
213 "warning: unwrapped ui message"), | 214 "warning: unwrapped ui message"), |