Skip to content

Files

Latest commit

 

History

History
30 lines (20 loc) · 594 Bytes

SC1120.md

File metadata and controls

30 lines (20 loc) · 594 Bytes

Pattern: Use of comment after here-doc token

Issue: -

Description

The terminator token for a here-document must be on an entirely separate line. No comments are allowed on this line.

Place the comment somewhere else, such as on the following line.

Example of incorrect code:

cat << eof  # --- Start greeting --
Hello
eof         # --- End greeting ---

Example of correct code:

cat << eof  # --- Start greeting --
Hello
eof
            # --- End greeting ---

Further Reading