Skip to content

Files

Latest commit

 

History

History
43 lines (28 loc) · 773 Bytes

SC1079.md

File metadata and controls

43 lines (28 loc) · 773 Bytes

Pattern: Missing closing " for shell script

Issue: -

Description

This rule warns when it detects multi-line double quoted, single quoted or backticked strings when the character that follows it looks out of place.

Example of incorrect code:

greeting="hello
target="world"

Example of correct code:

greeting="hello"
target="world"

Exceptions

If you do want a multi-line variable, just make sure the character after it is a quote, space or line feed.

var='multiline
'value

can be rewritten for readability and to remove the warning:

var='multiline
value'

As always `..` should be rewritten to $(..).

Further Reading