Skip to content

Commit 34939ca

Browse files
committed
Fuse map into any
1 parent e782047 commit 34939ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ShellCheck/Analytics.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2481,7 +2481,7 @@ checkCharRangeGlob p t@(T_Glob id str) |
24812481
where
24822482
isCharClass str = "[" `isPrefixOf` str && "]" `isSuffixOf` str
24832483
contents = dropNegation . drop 1 . take (length str - 1) $ str
2484-
hasDupes = any (>1) . map length . group . sort . filter (/= '-') $ contents
2484+
hasDupes = any ((>1) . length) . group . sort . filter (/= '-') $ contents
24852485
dropNegation s =
24862486
case s of
24872487
'!':rest -> rest
@@ -3404,7 +3404,7 @@ checkPipeToNowhere params t =
34043404

34053405
commandSpecificException name cmd =
34063406
case name of
3407-
"du" -> any (`elem` ["exclude-from", "files0-from"]) $ map snd $ getAllFlags cmd
3407+
"du" -> any ((`elem` ["exclude-from", "files0-from"]) . snd) $ getAllFlags cmd
34083408
_ -> False
34093409

34103410
warnAboutDupes (n, list@(_:_:_)) =

0 commit comments

Comments
 (0)