mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 05:21:34 -07:00
Handle offset references of the form [foo]:bar (fixes #1124)
This commit is contained in:
parent
5b226e733b
commit
4dceecb1ed
2 changed files with 8 additions and 2 deletions
|
@ -1820,6 +1820,7 @@ prop_checkUnused36= verifyNotTree checkUnusedAssignments "if [[ -v foo ]]; then
|
|||
prop_checkUnused37= verifyNotTree checkUnusedAssignments "fd=2; exec {fd}>&-"
|
||||
prop_checkUnused38= verifyTree checkUnusedAssignments "(( a=42 ))"
|
||||
prop_checkUnused39= verifyNotTree checkUnusedAssignments "declare -x -f foo"
|
||||
prop_checkUnused40= verifyNotTree checkUnusedAssignments "arr=(1 2); num=2; echo \"${arr[@]:num}\""
|
||||
checkUnusedAssignments params t = execWriter (mapM_ warnFor unused)
|
||||
where
|
||||
flow = variableFlow params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue