comparison contrib/check-code.py @ 14831:0407b7613e99 stable

treediscovery: rename stop() in tests to fix failures on AIX. It seems ksh, the default shell on AIX, does not permit the creation of a function called stop(). test-treediscovery.t and test-treediscovery-legacy.t both fail on AIX with error 'syntax error at line 25 : `(' unexpected'. Fix by renaming stop() in the scripts to tstop(). For completeness rename start() to tstart() to match. Both tests then pass on AIX. Add check for the use of stop() in a shell script to check-code.
author Jim Hague <jim.hague@acm.org>
date Tue, 05 Jul 2011 11:53:32 +0100
parents b071cd58af50
children 5a0fdc715769
comparison
equal deleted inserted replaced
14830:35f5cfdd0427 14831:0407b7613e99
66 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"), 66 ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"),
67 (r'^source\b', "don't use 'source', use '.'"), 67 (r'^source\b', "don't use 'source', use '.'"),
68 (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), 68 (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
69 (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"), 69 (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"),
70 (r'[^>]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"), 70 (r'[^>]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"),
71 (r'stop\(\)', "don't use 'stop' as a shell function name"),
71 ], 72 ],
72 # warnings 73 # warnings
73 [] 74 []
74 ] 75 ]
75 76