mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 05:21:34 -07:00
In (( x = y )), logic to not reference x also grabbed y
This commit is contained in:
parent
47fd16b8e8
commit
85e69f86eb
2 changed files with 2 additions and 1 deletions
|
@ -2071,6 +2071,7 @@ prop_checkUnused30= verifyTree checkUnusedAssignments "let a=1"
|
|||
prop_checkUnused31= verifyTree checkUnusedAssignments "let 'a=1'"
|
||||
prop_checkUnused32= verifyTree checkUnusedAssignments "let a=b=c; echo $a"
|
||||
prop_checkUnused33= verifyNotTree checkUnusedAssignments "a=foo; [[ foo =~ ^{$a}$ ]]"
|
||||
prop_checkUnused34= verifyNotTree checkUnusedAssignments "foo=1; (( t = foo )); echo $t"
|
||||
checkUnusedAssignments params t = execWriter (mapM_ warnFor unused)
|
||||
where
|
||||
flow = variableFlow params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue