Updated SC2154 (markdown)

koalaman
2015-03-07 21:05:30 -08:00
parent 70178a5291
commit cbaa83b422

@@ -11,6 +11,10 @@ or
target="world" target="world"
echo "hello $tagret" # misspelled echo "hello $tagret" # misspelled
or
echo "Result: ${mycmd -a myfile}" # trying to execute commands
### Correct code: ### Correct code:
var=name var=name
@@ -22,6 +26,10 @@ or
target="world" target="world"
echo "hello $target" echo "hello $target"
or
echo "Result: $(mycmd -a myfile)"
### 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.