From 9275c8ac020d7709760043ebf0e576cf7d797c5c Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sat, 5 Jun 2021 18:31:04 -0700 Subject: [PATCH] Created SC2287 (markdown) --- SC2287.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 SC2287.md diff --git a/SC2287.md b/SC2287.md new file mode 100644 index 0000000..307fb7e --- /dev/null +++ b/SC2287.md @@ -0,0 +1,27 @@ +## This is interpreted as a command name ending with '/'. Double check syntax. + +### Problematic code: + +```sh +df/ +``` + +### Correct code: + +```sh +df / +``` + +### Rationale: + +ShellCheck found a command name that ends with `/`. Since directories are not valid commands, this is always wrong. + +The most common reason is bad quoting or escaping, such as in the example where a space was missing between a command and its argument. + +### Exceptions: + +None + +### Related resources: + +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file