Updated SC2113 (markdown)

haruna
2021-05-21 03:56:10 +09:00
parent 6de8c5f56c
commit 9770403af4

@@ -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!
```