From 58ce7ae29fcb1076b660017ca239327cbe5e8995 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 13 Jan 2018 16:49:41 -0800 Subject: [PATCH] Created SC2225 (markdown) --- SC2225.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 SC2225.md diff --git a/SC2225.md b/SC2225.md new file mode 100644 index 0000000..3d746ea --- /dev/null +++ b/SC2225.md @@ -0,0 +1,22 @@ +## This cp has no destination. Check the arguments. + +### Problematic code: + +```sh +cp "$file $dir" +``` + +### Correct code: + +```sh +cp "$file" "$dir" +``` +### Rationale: + +ShellCheck found a `cp` command with a single parameter. This may be because the source and destination was accidentally merged into a single argument, or because the line was broken in an invalid way. + +Fix the `cp` statement by correctly specifying both source and destination. + +### Exceptions: + +None \ No newline at end of file