contrib/check-code.py
branchstable
changeset 50722 7e5be4a7cda7
parent 49570 3a2b6158374a
child 50723 65f949da8469
equal deleted inserted replaced
50721:a10d823a8e3d 50722:7e5be4a7cda7
   144         (r'rm -rf \*', "don't use naked rm -rf, target a directory"),
   144         (r'rm -rf \*', "don't use naked rm -rf, target a directory"),
   145         (
   145         (
   146             r'\[[^\]]+==',
   146             r'\[[^\]]+==',
   147             '[ foo == bar ] is a bashism, use [ foo = bar ] instead',
   147             '[ foo == bar ] is a bashism, use [ foo = bar ] instead',
   148         ),
   148         ),
   149         (
   149         (r'(^|\|\s*)egrep', "use grep -E for extended grep syntax"),
   150             r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',
       
   151             "use egrep for extended grep syntax",
       
   152         ),
       
   153         (r'(^|\|\s*)e?grep .*\\S', "don't use \\S in regular expression"),
   150         (r'(^|\|\s*)e?grep .*\\S', "don't use \\S in regular expression"),
   154         (r'(?<!!)/bin/', "don't use explicit paths for tools"),
   151         (r'(?<!!)/bin/', "don't use explicit paths for tools"),
   155         (r'#!.*/bash', "don't use bash in shebang, use sh"),
   152         (r'#!.*/bash', "don't use bash in shebang, use sh"),
   156         (r'[^\n]\Z', "no trailing newline"),
   153         (r'[^\n]\Z', "no trailing newline"),
   157         (r'export .*=', "don't export and assign at once"),
   154         (r'export .*=', "don't export and assign at once"),