Open
Description
Terminating the Bash here document after the termination of process substitution silently passes ShellCheck.
Problematic code:
cat <(cat <<EOF)
Hello, world!
EOF
Correct code:
cat <(cat <<EOF
Hello, world!
EOF
)
Bash tolerates the problematic code and behave the same as the correct code, plus a line of warning message:
bash: warning: command substitution: 1 unterminated here-document
Due to this behavior of Bash, such anti-pattern is hard to locate without going through the standard error line-by-line. Flagging it as a SC1044 or its own rule will be very helpful.
Metadata
Metadata
Assignees
Labels
No labels