Updated SC2154 (markdown)

koalaman
2015-03-07 19:25:12 -08:00
parent 4f16110c93
commit 70178a5291

@@ -4,7 +4,12 @@
var=name var=name
n=42 n=42
echo "$var_$n.jpg" echo "$var_$n.jpg" # overextended
or
target="world"
echo "hello $tagret" # misspelled
### Correct code: ### Correct code:
@@ -12,6 +17,11 @@
n=42 n=42
echo "${var}_$n.jpg" echo "${var}_$n.jpg"
or
target="world"
echo "hello $target"
### Rationale: ### Rationale:
ShellCheck has noticed that you reference a variable that is not assigned. Double check that the variable is indeed assigned, and that the name is not misspelled. ShellCheck has noticed that you reference a variable that is not assigned. Double check that the variable is indeed assigned, and that the name is not misspelled.