diff --git a/SC2113.md b/SC2113.md index 7eef439..a6aa0ad 100644 --- a/SC2113.md +++ b/SC2113.md @@ -1,16 +1,31 @@ -Instead of +## `function` keyword is non-standard. Use `foo()` instead of `function foo`. -``` sh +### Problematic code: + +In `sh`, + +```sh function quit { exit } ``` -...add the parenthesis to the function name and remove the word "function": +### Correct code: -``` sh +1. add `()` to after the function name. _this code newly cause [[SC2113]]._ + +```sh +function quit() { + exit +} +#=> SC2112: 'function' keyword is non-standard. Delete it. +``` + +2. remove `function` + +```sh quit() { exit } -``` - +#=> No issues detected! +``` \ No newline at end of file