mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-09 14:15:55 +08:00
Use maybe instead of fromMaybe and fmap
This commit is contained in:
@@ -88,9 +88,9 @@ checkScript sys spec = do
|
||||
asOptionalChecks = csOptionalChecks spec
|
||||
} where as = newAnalysisSpec root
|
||||
let analysisMessages =
|
||||
fromMaybe [] $
|
||||
maybe []
|
||||
(arComments . analyzeScript . analysisSpec)
|
||||
<$> prRoot result
|
||||
$ prRoot result
|
||||
let translator = tokenToPosition tokenPositions
|
||||
return . nub . sortMessages . filter shouldInclude $
|
||||
(parseMessages ++ map translator analysisMessages)
|
||||
|
Reference in New Issue
Block a user