Created SC2224 (markdown)

koalaman
2018-01-13 16:49:14 -08:00
parent a1c69d166a
commit 23675279fc

22
SC2224.md Normal file

@@ -0,0 +1,22 @@
## This mv has no destination. Check the arguments.
### Problematic code:
```sh
mv "$file $dir"
```
### Correct code:
```sh
mv "$file" "$dir"
```
### Rationale:
ShellCheck found an `mv` 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 `mv` statement by correctly specifying both source and destination.
### Exceptions:
None