mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 13:31:36 -07:00
Use Map.member instead of isJust and Map.lookup
This commit is contained in:
parent
8f0448133c
commit
ea24e25efd
1 changed files with 1 additions and 1 deletions
|
@ -849,7 +849,7 @@ checkArrayWithoutIndex params _ =
|
|||
readF _ _ _ = return []
|
||||
|
||||
writeF _ (T_Assignment id mode name [] _) _ (DataString _) = do
|
||||
isArray <- gets (isJust . Map.lookup name)
|
||||
isArray <- gets (Map.member name)
|
||||
return $ if not isArray then [] else
|
||||
case mode of
|
||||
Assign -> [makeComment WarningC id 2178 "Variable was used as an array but is now assigned a string."]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue