mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Add highlighting to last code-block
@@ -32,8 +32,10 @@ If you are trying to do something else, look up the syntax for what you are tryi
|
|||||||
|
|
||||||
POSIX allows the body of a function to be any compound command, e.g. `foo() for i; do :; done`. Since this usage is rare, ShellCheck intentionally requires the body to be `{ ..; }` (or `( ..; )`):
|
POSIX allows the body of a function to be any compound command, e.g. `foo() for i; do :; done`. Since this usage is rare, ShellCheck intentionally requires the body to be `{ ..; }` (or `( ..; )`):
|
||||||
|
|
||||||
|
```sh
|
||||||
foo() {
|
foo() {
|
||||||
for i; do :; done
|
for i; do :; done
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
This additional structure requirement helps improve error messages and suggestions by not parsing down a path that less advanced users wouldn't expect.
|
This additional structure requirement helps improve error messages and suggestions by not parsing down a path that less advanced users wouldn't expect.
|
Reference in New Issue
Block a user