diff contrib/check-code.py @ 15607:fab28a577a38 stable

test-svn-subrepo: fix reference output for svn 1.7 I modified check-code.py "$?" detection because I thought my use was legit, we cannot test exit status of pipelines commands except for the last one without this. So it now tolerates "[$?" which is unlikely to be added by mistake. Tested on: - OSX + svn 1.7.1 - Linux + svn 1.6.12
author Patrick Mezard <pmezard@gmail.com>
date Fri, 02 Dec 2011 16:50:48 +0100
parents 3bece03bf3c6
children ec8a49c46d7e
line wrap: on
line diff
--- a/contrib/check-code.py	Thu Dec 01 17:39:30 2011 -0500
+++ b/contrib/check-code.py	Fri Dec 02 16:50:48 2011 +0100
@@ -88,7 +88,7 @@
     (r'^(\S|  $ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"),
     (uprefix + r'.*\|\s*sed', "use regex test output patterns instead of sed"),
     (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
-    (uprefix + r'.*\$\?', "explicit exit code checks unnecessary"),
+    (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"),
     (uprefix + r'.*\|\| echo.*(fail|error)',
      "explicit exit code checks unnecessary"),
     (uprefix + r'set -e', "don't use set -e"),