From dedf932fe8b9dcf4f852d4289032e6d25e7e5d40 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sat, 30 Dec 2023 13:59:15 -0500 Subject: [PATCH] Use traverse instead of sequence and map --- src/ShellCheck/Analytics.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index 19ff51b04..df0b3e6c4 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -4936,7 +4936,7 @@ checkOverwrittenExitCode params t = guard . not $ S.null exitCodeIds let idToToken = idMap params - exitCodeTokens <- sequence $ map (\k -> Map.lookup k idToToken) $ S.toList exitCodeIds + exitCodeTokens <- traverse (\k -> Map.lookup k idToToken) $ S.toList exitCodeIds return $ do when (all isCondition exitCodeTokens && not (usedUnconditionally t exitCodeIds)) $ warn id 2319 "This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten."