mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 21:11:35 -07:00
Treat typeset similar to declare (fixes #2354)
This commit is contained in:
parent
0d128dd918
commit
788aee1b7c
2 changed files with 15 additions and 7 deletions
|
@ -2380,6 +2380,7 @@ prop_checkUnused46= verifyTree checkUnusedAssignments "readonly foo=(bar)"
|
|||
prop_checkUnused47= verifyNotTree checkUnusedAssignments "a=1; alias hello='echo $a'"
|
||||
prop_checkUnused48= verifyNotTree checkUnusedAssignments "_a=1"
|
||||
prop_checkUnused49= verifyNotTree checkUnusedAssignments "declare -A array; key=a; [[ -v array[$key] ]]"
|
||||
prop_checkUnused50= verifyNotTree checkUnusedAssignments "foofunc() { :; }; typeset -fx foofunc"
|
||||
|
||||
checkUnusedAssignments params t = execWriter (mapM_ warnFor unused)
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue