Created SC1120 (markdown)

koalaman
2017-07-08 14:51:14 -07:00
parent 8628a98688
commit 14a1827a3c

27
SC1120.md Normal file

@@ -0,0 +1,27 @@
## No comments allowed after here-doc token. Comment the next line instead.
### Problematic code:
```sh
cat << eof # --- Start greeting --
Hello
eof # --- End greeting ---
```
### Correct code:
```sh
cat << eof # --- Start greeting --
Hello
eof
# --- End greeting ---
```
### Rationale:
The terminator token for a here document must be on an entirely separate line. No comments are allowed after it.
Move the comment somewhere else, such as the next line.
### Exceptions:
None