Use void instead of do and return ()

This commit is contained in:
Joseph C. Sible 2020-02-09 20:22:06 -05:00
parent 0ca50159ec
commit 0e00249eae
1 changed files with 1 additions and 2 deletions

View File

@ -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)