diff 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
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Jul 04 14:36:16 2011 +0300
+++ b/contrib/check-code.py	Tue Jul 05 11:53:32 2011 +0100
@@ -68,6 +68,7 @@
     (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
     (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"),
     (r'[^>]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"),
+    (r'stop\(\)', "don't use 'stop' as a shell function name"),
   ],
   # warnings
   []