Created SC2194 (markdown)

koalaman
2016-12-29 14:34:21 -08:00
parent 3c8c55f6ba
commit f030a524bb

26
SC2194.md Normal file

@@ -0,0 +1,26 @@
## This word is constant. Did you forget the $ on a variable?
### Problematic code:
```sh
case foo in
bar) echo "Match"
esac
```
### Correct code:
```sh
case $foo in
bar) echo "Match"
esac
```
### Rationale:
You are using a `case` statement to compare a literal word.
You most likely wanted to treat this word as a `$variable` or `$(command)` instead.
### Exceptions:
None