##// END OF EJS Templates
check-code: put grouping around regexps generated from testpats...
Mads Kiilerich -
r16495:5f9835ed stable
parent child Browse files
Show More
@@ -43,7 +43,7 b' def rephere(m):'
43
43
44 testpats = [
44 testpats = [
45 [
45 [
46 (r'(pushd|popd)', "don't use 'pushd' or 'popd', use 'cd'"),
46 (r'pushd|popd', "don't use 'pushd' or 'popd', use 'cd'"),
47 (r'\W\$?\(\([^\)\n]*\)\)', "don't use (()) or $(()), use 'expr'"),
47 (r'\W\$?\(\([^\)\n]*\)\)', "don't use (()) or $(()), use 'expr'"),
48 (r'^function', "don't use 'function', use old style"),
48 (r'^function', "don't use 'function', use old style"),
49 (r'grep.*-q', "don't use 'grep -q', redirect to /dev/null"),
49 (r'grep.*-q', "don't use 'grep -q', redirect to /dev/null"),
@@ -108,9 +108,9 b' utestpats = ['
108 for i in [0, 1]:
108 for i in [0, 1]:
109 for p, m in testpats[i]:
109 for p, m in testpats[i]:
110 if p.startswith(r'^'):
110 if p.startswith(r'^'):
111 p = uprefix + p[1:]
111 p = r"^ \$ (%s)" % p[1:]
112 else:
112 else:
113 p = uprefix + ".*" + p
113 p = r"^ \$ .*(%s)" % p
114 utestpats[i].append((p, m))
114 utestpats[i].append((p, m))
115
115
116 utestfilters = [
116 utestfilters = [
General Comments 0
You need to be logged in to leave comments. Login now