Created SC1074 (markdown)

haruna
2021-05-21 03:28:08 +09:00
parent 7dcfce2494
commit d3fc023542

30
SC1074.md Normal file

@@ -0,0 +1,30 @@
# Did you forget the `;;` after the previous case item?
### Problematic code:
```bash
while getoptions f option
do
case "${options}"
in
f) FTR="${ARG}"
\?) exit
esac
done
```
### Correct code:
```bash
while getoptions f option
do
case "${options}"
in
f) FTR="${ARG}"
\?) exit;;
esac
done
```
### Rationale:
Syntax `case` needs `;;` after the previous case item. If not, syntax error will cause.