mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Use mapM_ instead of isJust and fromJust
This commit is contained in:
parent
5adfea21ee
commit
26b949b9b0
1 changed files with 2 additions and 3 deletions
|
@ -1431,9 +1431,8 @@ prop_checkBackreferencingDeclaration7 = verify (checkBackreferencingDeclaration
|
|||
checkBackreferencingDeclaration cmd = CommandCheck (Exactly cmd) check
|
||||
where
|
||||
check t = do
|
||||
cfga <- asks cfgAnalysis
|
||||
when (isJust cfga) $
|
||||
foldM_ (perArg $ fromJust cfga) M.empty $ arguments t
|
||||
maybeCfga <- asks cfgAnalysis
|
||||
mapM_ (\cfga -> foldM_ (perArg cfga) M.empty $ arguments t) maybeCfga
|
||||
|
||||
perArg cfga leftArgs t =
|
||||
case t of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue