comparison contrib/check-code.py @ 11210:0c0088881562

check-code: add check for 'source'
author Yuya Nishihara <yuya@tcha.org>
date Fri, 21 May 2010 22:53:57 +0900
parents 13a1b2fb7ef2
children 920a783e5f91
comparison
equal deleted inserted replaced
11209:385b95d10410 11210:0c0088881562
59 (r'/bin/', "don't use explicit paths for tools"), 59 (r'/bin/', "don't use explicit paths for tools"),
60 (r'\$PWD', "don't use $PWD, use `pwd`"), 60 (r'\$PWD', "don't use $PWD, use `pwd`"),
61 (r'[^\n]\Z', "no trailing newline"), 61 (r'[^\n]\Z', "no trailing newline"),
62 (r'export.*=', "don't export and assign at once"), 62 (r'export.*=', "don't export and assign at once"),
63 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"), 63 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"),
64 (r'^source\b', "don't use 'source', use '.'"),
64 ] 65 ]
65 66
66 testfilters = [ 67 testfilters = [
67 (r"( *)(#([^\n]*\S)?)", repcomment), 68 (r"( *)(#([^\n]*\S)?)", repcomment),
68 (r"<<(\S+)((.|\n)*?\n\1)", rephere), 69 (r"<<(\S+)((.|\n)*?\n\1)", rephere),