From 0e00249eaed3a13e78bdcd9f146661963959f685 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sun, 9 Feb 2020 20:22:06 -0500 Subject: [PATCH] Use void instead of do and return () --- src/ShellCheck/Analytics.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index cfe9301..6bd1e5d 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -500,11 +500,10 @@ checkPipePitfalls _ (T_Pipeline id _ commands) = do for' ["ls", "xargs"] $ \x -> warn x 2011 "Use 'find .. -print0 | xargs -0 ..' or 'find .. -exec .. +' to allow non-alphanumeric filenames." ] - unless didLs $ do + unless didLs $ void $ for ["ls", "?"] $ \(ls:_) -> unless (hasShortParameter 'N' (oversimplify ls)) $ info (getId ls) 2012 "Use find instead of ls to better handle non-alphanumeric filenames." - return () where for l f = let indices = indexOfSublists l (map (headOrDefault "" . oversimplify) commands)