Show More
@@ -45,12 +45,10 b' testpats = [' | |||
|
45 | 45 | [ |
|
46 | 46 | (r'pushd|popd', "don't use 'pushd' or 'popd', use 'cd'"), |
|
47 | 47 | (r'\W\$?\(\([^\)\n]*\)\)', "don't use (()) or $(()), use 'expr'"), |
|
48 | (r'^function', "don't use 'function', use old style"), | |
|
49 | 48 | (r'grep.*-q', "don't use 'grep -q', redirect to /dev/null"), |
|
50 | 49 | (r'sed.*-i', "don't use 'sed -i', use a temporary file"), |
|
51 | 50 | (r'echo.*\\n', "don't use 'echo \\n', use printf"), |
|
52 | 51 | (r'echo -n', "don't use 'echo -n', use printf"), |
|
53 | (r'^diff.*-\w*N', "don't use 'diff -N'"), | |
|
54 | 52 | (r'(^| )wc[^|]*$\n(?!.*\(re\))', "filter wc output"), |
|
55 | 53 | (r'head -c', "don't use 'head -c', use 'dd'"), |
|
56 | 54 | (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"), |
@@ -62,10 +60,8 b' testpats = [' | |||
|
62 | 60 | (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w', |
|
63 | 61 | "use egrep for extended grep syntax"), |
|
64 | 62 | (r'/bin/', "don't use explicit paths for tools"), |
|
65 | (r'\$PWD', "don't use $PWD, use `pwd`"), | |
|
66 | 63 | (r'[^\n]\Z', "no trailing newline"), |
|
67 | 64 | (r'export.*=', "don't export and assign at once"), |
|
68 | (r'^([^"\'\n]|("[^"\n]*")|(\'[^\'\n]*\'))*\^', "^ must be quoted"), | |
|
69 | 65 | (r'^source\b', "don't use 'source', use '.'"), |
|
70 | 66 | (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), |
|
71 | 67 | (r'ls +[^|\n-]+ +-', "options to 'ls' must come before filenames"), |
@@ -79,7 +75,12 b' testpats = [' | |||
|
79 | 75 | (r'^( *)\t', "don't use tabs to indent"), |
|
80 | 76 | ], |
|
81 | 77 | # warnings |
|
82 |
[ |
|
|
78 | [ | |
|
79 | (r'^function', "don't use 'function', use old style"), | |
|
80 | (r'^diff.*-\w*N', "don't use 'diff -N'"), | |
|
81 | (r'\$PWD', "don't use $PWD, use `pwd`"), | |
|
82 | (r'^([^"\'\n]|("[^"\n]*")|(\'[^\'\n]*\'))*\^', "^ must be quoted"), | |
|
83 | ] | |
|
83 | 84 | ] |
|
84 | 85 | |
|
85 | 86 | testfilters = [ |
@@ -106,9 +107,9 b' utestpats = [' | |||
|
106 | 107 | for i in [0, 1]: |
|
107 | 108 | for p, m in testpats[i]: |
|
108 | 109 | if p.startswith(r'^'): |
|
109 |
p = r"^ |
|
|
110 | p = r"^ [$>] (%s)" % p[1:] | |
|
110 | 111 | else: |
|
111 |
p = r"^ |
|
|
112 | p = r"^ [$>] .*(%s)" % p | |
|
112 | 113 | utestpats[i].append((p, m)) |
|
113 | 114 | |
|
114 | 115 | utestfilters = [ |
@@ -613,12 +613,25 b'' | |||
|
613 | 613 | tests/test-commandserver.py:0: |
|
614 | 614 | > print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', 'encoding: ***', data)) |
|
615 | 615 | warning: line over 80 characters |
|
616 | tests/test-convert-mtn.t:0: | |
|
617 | > > function get_passphrase(keypair_id) | |
|
618 | don't use 'function', use old style | |
|
616 | 619 | tests/test-filecache.py:0: |
|
617 | 620 | > except: |
|
618 | 621 | warning: naked except clause |
|
619 | 622 | tests/test-filecache.py:0: |
|
620 | 623 | > if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'], 'cacheable']): |
|
621 | 624 | warning: line over 80 characters |
|
625 | tests/test-import-git.t:0: | |
|
626 | > > Mc\${NkU|\`?^000jF3jhEB | |
|
627 | ^ must be quoted | |
|
628 | tests/test-import.t:0: | |
|
629 | > > diff -Naur proj-orig/foo proj-new/foo | |
|
630 | don't use 'diff -N' | |
|
631 | don't use 'diff -N' | |
|
632 | tests/test-schemes.t:0: | |
|
633 | > > z = file:\$PWD/ | |
|
634 | don't use $PWD, use `pwd` | |
|
622 | 635 | tests/test-ui-color.py:0: |
|
623 | 636 | > testui.warn('warning\n') |
|
624 | 637 | warning: unwrapped ui message |
General Comments 0
You need to be logged in to leave comments.
Login now