mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1118 (markdown)
28
SC1118.md
Normal file
28
SC1118.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## Delete whitespace after the here-doc end token.
|
||||
|
||||
### Problematic code:
|
||||
|
||||
"▭" below indicates an otherwise invisible space:
|
||||
|
||||
```sh
|
||||
cat << "eof"
|
||||
Hello
|
||||
eof▭
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
cat << "eof"
|
||||
Hello
|
||||
eof
|
||||
```
|
||||
### Rationale:
|
||||
|
||||
The end token of your here document has trailing whitespace. This is invisible to the naked eye, but shells do not accept it.
|
||||
|
||||
Remove the trailing whitespace.
|
||||
|
||||
### Exceptions:
|
||||
|
||||
None.
|
Reference in New Issue
Block a user