Skip to content
Snippets Groups Projects
Commit cbeb54ec authored by Jun Wu's avatar Jun Wu
Browse files

check-code: add a rule to forbid "cp -r"

See the commit message of the previous patch for the reason. In short,
according to the current POSIX standard, "-r" is "removed", and "-R" is the
current standard way to do "copy file hierarchies".
parent c059286a
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,8 @@
(r'\|&', "don't use |&, use 2>&1"),
(r'\w = +\w', "only one space after = allowed"),
(r'\bsed\b.*[^\\]\\n', "don't use 'sed ... \\n', use a \\ and a newline"),
(r'env.*-u', "don't use 'env -u VAR', use 'unset VAR'")
(r'env.*-u', "don't use 'env -u VAR', use 'unset VAR'"),
(r'cp.* -r ', "don't use 'cp -r', use 'cp -R'"),
],
# warnings
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment