Skip to content

Files

Latest commit

 

History

History
25 lines (15 loc) · 567 Bytes

SC1054.md

File metadata and controls

25 lines (15 loc) · 567 Bytes

Pattern: Missing space after {

Issue: -

Description

{ is only recognized as the start of a command group when it's a separate token.

If it's not a separate token, like in the problematic example, it will be considered a literal character, as if writing "{echo" with quotes, and therefore usually cause a syntax error.

Example of incorrect code:

foo() {echo "hello world;}

Example of correct code:

foo() { echo "hello world;}

Further Reading