Mercurial > public > mercurial-scm > hg-stable
comparison contrib/check-code.py @ 19981:d1e14e7e5b40
check-code: fix an error message
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Sat, 02 Nov 2013 11:25:33 +0100 |
parents | b3de50b0c7aa |
children | 3e1e4a8aec1e |
comparison
equal
deleted
inserted
replaced
19936:8179eb28983b | 19981:d1e14e7e5b40 |
---|---|
245 (r'opener\([^)]*\).write\(', | 245 (r'opener\([^)]*\).write\(', |
246 "use opener.write() instead"), | 246 "use opener.write() instead"), |
247 (r'[\s\(](open|file)\([^)]*\)\.read\(', | 247 (r'[\s\(](open|file)\([^)]*\)\.read\(', |
248 "use util.readfile() instead"), | 248 "use util.readfile() instead"), |
249 (r'[\s\(](open|file)\([^)]*\)\.write\(', | 249 (r'[\s\(](open|file)\([^)]*\)\.write\(', |
250 "use util.readfile() instead"), | 250 "use util.writefile() instead"), |
251 (r'^[\s\(]*(open(er)?|file)\([^)]*\)', | 251 (r'^[\s\(]*(open(er)?|file)\([^)]*\)', |
252 "always assign an opened file to a variable, and close it afterwards"), | 252 "always assign an opened file to a variable, and close it afterwards"), |
253 (r'[\s\(](open|file)\([^)]*\)\.', | 253 (r'[\s\(](open|file)\([^)]*\)\.', |
254 "always assign an opened file to a variable, and close it afterwards"), | 254 "always assign an opened file to a variable, and close it afterwards"), |
255 (r'(?i)descendent', "the proper spelling is descendAnt"), | 255 (r'(?i)descendent', "the proper spelling is descendAnt"), |