From 2cfd1f27140d15132a031ef71a715e522a40837b Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Mon, 28 Dec 2020 18:10:47 -0500 Subject: [PATCH] Fuse maps --- shellcheck.hs | 2 +- src/ShellCheck/Checks/Commands.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shellcheck.hs b/shellcheck.hs index f1757ef..d7e818d 100644 --- a/shellcheck.hs +++ b/shellcheck.hs @@ -507,7 +507,7 @@ ioInterface options files = do where find filename deflt = do sources <- findM ((allowable inputs) `andM` doesFileExist) $ - (adjustPath filename):(map ( filename) $ map adjustPath $ sourcePathFlag ++ sourcePathAnnotation) + (adjustPath filename):(map (( filename) . adjustPath) $ sourcePathFlag ++ sourcePathAnnotation) case sources of Nothing -> return deflt Just first -> return first diff --git a/src/ShellCheck/Checks/Commands.hs b/src/ShellCheck/Checks/Commands.hs index 771083e..5be5a9a 100644 --- a/src/ShellCheck/Checks/Commands.hs +++ b/src/ShellCheck/Checks/Commands.hs @@ -951,7 +951,7 @@ checkCatastrophicRm = CommandCheck (Basename "rm") $ \t -> when (isRecursive t) $ mapM_ (mapM_ checkWord . braceExpand) $ arguments t where - isRecursive = any (`elem` ["r", "R", "recursive"]) . map snd . getAllFlags + isRecursive = any ((`elem` ["r", "R", "recursive"]) . snd) . getAllFlags checkWord token = case getLiteralString token of