contrib/check-code.py
changeset 27791 0029c2bebc23
parent 27693 2b9126d6588b
child 27989 e77ac31b64a1
equal deleted inserted replaced
27790:2d294dada4f8 27791:0029c2bebc23
   105     (r'rm -rf \*', "don't use naked rm -rf, target a directory"),
   105     (r'rm -rf \*', "don't use naked rm -rf, target a directory"),
   106     (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',
   106     (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',
   107      "use egrep for extended grep syntax"),
   107      "use egrep for extended grep syntax"),
   108     (r'/bin/', "don't use explicit paths for tools"),
   108     (r'/bin/', "don't use explicit paths for tools"),
   109     (r'[^\n]\Z', "no trailing newline"),
   109     (r'[^\n]\Z', "no trailing newline"),
   110     (r'export.*=', "don't export and assign at once"),
   110     (r'export .*=', "don't export and assign at once"),
   111     (r'^source\b', "don't use 'source', use '.'"),
   111     (r'^source\b', "don't use 'source', use '.'"),
   112     (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
   112     (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
   113     (r'ls +[^|\n-]+ +-', "options to 'ls' must come before filenames"),
   113     (r'ls +[^|\n-]+ +-', "options to 'ls' must come before filenames"),
   114     (r'[^>\n]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"),
   114     (r'[^>\n]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"),
   115     (r'^stop\(\)', "don't use 'stop' as a shell function name"),
   115     (r'^stop\(\)', "don't use 'stop' as a shell function name"),