comparison contrib/check-code.py @ 17345:4f8054d3171b

check-code: fix check for trailing whitespace on sh command lines The $ has been without necessary escaping since introduced in c7d23b4ca4ba.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 08 Aug 2012 18:10:16 +0200
parents e51d4aedace9
children 2944a6d35158
comparison
equal deleted inserted replaced
17344:539d948d8d4b 17345:4f8054d3171b
89 ] 89 ]
90 90
91 uprefix = r"^ \$ " 91 uprefix = r"^ \$ "
92 utestpats = [ 92 utestpats = [
93 [ 93 [
94 (r'^(\S| $ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"), 94 (r'^(\S| \$ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"),
95 (uprefix + r'.*\|\s*sed[^|>\n]*\n', 95 (uprefix + r'.*\|\s*sed[^|>\n]*\n',
96 "use regex test output patterns instead of sed"), 96 "use regex test output patterns instead of sed"),
97 (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"), 97 (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
98 (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"), 98 (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"),
99 (uprefix + r'.*\|\| echo.*(fail|error)', 99 (uprefix + r'.*\|\| echo.*(fail|error)',