mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-08 05:51:09 -07:00
Use maybe instead of fromMaybe and fmap
This commit is contained in:
parent
f5c6771016
commit
28978a8b65
3 changed files with 9 additions and 9 deletions
|
@ -784,8 +784,8 @@ isCommand token str = isCommandMatch token (\cmd -> cmd == str || ('/' : str) `
|
|||
-- Compare a command to a literal. Like above, but checks full path.
|
||||
isUnqualifiedCommand token str = isCommandMatch token (== str)
|
||||
|
||||
isCommandMatch token matcher = fromMaybe False $
|
||||
fmap matcher (getCommandName token)
|
||||
isCommandMatch token matcher = maybe False
|
||||
matcher (getCommandName token)
|
||||
|
||||
-- Does this regex look like it was intended as a glob?
|
||||
-- True: *foo*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue