comparison contrib/check-code.py @ 13012:8b167ee8242f

check-code: catch 'ls filename --option' case as per 6bdae8ea0b48
author Martin Geisler <mg@aragost.com>
date Wed, 17 Nov 2010 09:37:57 +0100
parents 34034e55424f
children 53391819f195
comparison
equal deleted inserted replaced
13011:4936a04b6792 13012:8b167ee8242f
62 (r'[^\n]\Z', "no trailing newline"), 62 (r'[^\n]\Z', "no trailing newline"),
63 (r'export.*=', "don't export and assign at once"), 63 (r'export.*=', "don't export and assign at once"),
64 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"), 64 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"),
65 (r'^source\b', "don't use 'source', use '.'"), 65 (r'^source\b', "don't use 'source', use '.'"),
66 (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), 66 (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
67 (r'ls\s+[^-]+\s+-', "options to 'ls' must come before filenames"),
67 ] 68 ]
68 69
69 testfilters = [ 70 testfilters = [
70 (r"( *)(#([^\n]*\S)?)", repcomment), 71 (r"( *)(#([^\n]*\S)?)", repcomment),
71 (r"<<(\S+)((.|\n)*?\n\1)", rephere), 72 (r"<<(\S+)((.|\n)*?\n\1)", rephere),