Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 734 Bytes

SC1040.md

File metadata and controls

41 lines (27 loc) · 734 Bytes

Pattern: Use of <<- with space indentation

Issue: -

Description

<<-, by design, only strips tabs. Not spaces.

Your editor may be automatically replacing tabs with spaces, either when you type them or when you save the file or both.

Example of incorrect code:

Any code using <<- that is indented with spaces. cat -T script shows

    cat <<- foo
        Hello world
    foo

Example of correct code:

Code using <<- must be indented with tabs. cat -T script shows

^Icat <<- foo
^I^IHello world
^Ifoo

Or simply don't indent the end token:

    cat <<- foo
      Hello World
foo

Further Reading