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)