mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-01 09:19:20 +08:00
Use mapM_ and sequence_ instead of reimplementing them
This commit is contained in:
@@ -382,7 +382,7 @@ getAssociativeArrays t =
|
||||
nub . execWriter $ doAnalysis f t
|
||||
where
|
||||
f :: Token -> Writer [String] ()
|
||||
f t@T_SimpleCommand {} = fromMaybe (return ()) $ do
|
||||
f t@T_SimpleCommand {} = sequence_ $ do
|
||||
name <- getCommandName t
|
||||
let assocNames = ["declare","local","typeset"]
|
||||
guard $ elem name assocNames
|
||||
|
Reference in New Issue
Block a user