diff --git a/SC1054.md b/SC1054.md new file mode 100644 index 0000000..9065236 --- /dev/null +++ b/SC1054.md @@ -0,0 +1,22 @@ +## You need a space after the '{'. + +### Problematic code: + +```sh +foo() {echo "hello world;} +``` + +### Correct code: + +```sh +foo() { echo "hello world;} +``` +### Rationale: + +`{` 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. + +### Exceptions: + +None. \ No newline at end of file