mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 14:10:38 +08:00
Use void instead of do and return ()
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user