From 14a1827a3c009d39f0af96db75aa5ff6f9a00c27 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 8 Jul 2017 14:51:14 -0700 Subject: [PATCH] Created SC1120 (markdown) --- SC1120.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 SC1120.md diff --git a/SC1120.md b/SC1120.md new file mode 100644 index 0000000..9078a96 --- /dev/null +++ b/SC1120.md @@ -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 \ No newline at end of file