mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-03-12 12:35:25 -07:00
Created SC2287 (markdown)
parent
4377f5ab62
commit
9275c8ac02
27
SC2287.md
Normal file
27
SC2287.md
Normal file
@ -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!
|
Loading…
x
Reference in New Issue
Block a user