Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 14549:48ec0763afbb
check-code: catch misspellings of descendant
This word is fairly common in Mercurial, and easy to misspell.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 07 Jun 2011 17:02:54 -0500 |
parents | 1ffeeb91c55d |
children | 6c7283faa967 |
comparison
equal
deleted
inserted
replaced
14548:cd1a01550ca2 | 14549:48ec0763afbb |
---|---|
175 "use util.readfile() instead"), | 175 "use util.readfile() instead"), |
176 (r'^[\s\(]*(open(er)?|file)\([^)]*\)', | 176 (r'^[\s\(]*(open(er)?|file)\([^)]*\)', |
177 "always assign an opened file to a variable, and close it afterwards"), | 177 "always assign an opened file to a variable, and close it afterwards"), |
178 (r'[\s\(](open|file)\([^)]*\)\.', | 178 (r'[\s\(](open|file)\([^)]*\)\.', |
179 "always assign an opened file to a variable, and close it afterwards"), | 179 "always assign an opened file to a variable, and close it afterwards"), |
180 (r'(?i)descendent', "the proper spelling is descendAnt"), | |
180 ], | 181 ], |
181 # warnings | 182 # warnings |
182 [ | 183 [ |
183 (r'.{81}', "warning: line over 80 characters"), | 184 (r'.{81}', "warning: line over 80 characters"), |
184 (r'^\s*except:$', "warning: naked except clause"), | 185 (r'^\s*except:$', "warning: naked except clause"), |