Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 13522:7ac93ec49c2d
check-code: better check for overwriting $HGRCPATH
Suggested by Mads Kiilerich on IRC.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Wed, 02 Mar 2011 14:22:50 +0100 |
parents | 43b3b761d9d1 |
children | 121c89dd7983 |
comparison
equal
deleted
inserted
replaced
13521:c1629963158a | 13522:7ac93ec49c2d |
---|---|
64 (r'export.*=', "don't export and assign at once"), | 64 (r'export.*=', "don't export and assign at once"), |
65 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"), | 65 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"), |
66 (r'^source\b', "don't use 'source', use '.'"), | 66 (r'^source\b', "don't use 'source', use '.'"), |
67 (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), | 67 (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), |
68 (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"), | 68 (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"), |
69 (r'cat > \$HGRCPATH <<EOF', "append to $HGRCPATH, do not overwrite it"), | 69 (r'[^>]>\s*\$HGRCPATH <<EOF', "append to $HGRCPATH, do not overwrite it"), |
70 ] | 70 ] |
71 | 71 |
72 testfilters = [ | 72 testfilters = [ |
73 (r"( *)(#([^\n]*\S)?)", repcomment), | 73 (r"( *)(#([^\n]*\S)?)", repcomment), |
74 (r"<<(\S+)((.|\n)*?\n\1)", rephere), | 74 (r"<<(\S+)((.|\n)*?\n\1)", rephere), |