diff --git a/SC2194.md b/SC2194.md new file mode 100644 index 0000000..578f3d9 --- /dev/null +++ b/SC2194.md @@ -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 \ No newline at end of file