mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 17:11:00 +08:00
Don't warn about unused vars with readonly -f
This commit is contained in:
@@ -2136,6 +2136,7 @@ prop_checkUnassignedReferences22= verifyNotTree checkUnassignedReferences "echo
|
||||
prop_checkUnassignedReferences23= verifyTree checkUnassignedReferences "declare -a foo; foo[bar]=42;"
|
||||
prop_checkUnassignedReferences24= verifyNotTree checkUnassignedReferences "declare -A foo; foo[bar]=42;"
|
||||
prop_checkUnassignedReferences25= verifyNotTree checkUnassignedReferences "declare -A foo=(); foo[bar]=42;"
|
||||
prop_checkUnassignedReferences26= verifyNotTree checkUnassignedReferences "a::b() { foo; }; readonly -f a::b"
|
||||
checkUnassignedReferences params t = warnings
|
||||
where
|
||||
(readMap, writeMap) = execState (mapM tally $ variableFlow params) (Map.empty, Map.empty)
|
||||
|
Reference in New Issue
Block a user