Suggest grep -c for grep|wc
This commit is contained in:
parent
f9f965693d
commit
f549aad809
|
@ -477,6 +477,9 @@ checkPipePitfalls _ (T_Pipeline id _ commands) = do
|
||||||
for' ["ps", "grep"] $
|
for' ["ps", "grep"] $
|
||||||
\x -> info x 2009 "Consider using pgrep instead of grepping ps output."
|
\x -> info x 2009 "Consider using pgrep instead of grepping ps output."
|
||||||
|
|
||||||
|
for' ["grep", "wc"] $
|
||||||
|
\x -> style x 2126 "Consider using grep -c instead of grep|wc."
|
||||||
|
|
||||||
didLs <- liftM or . sequence $ [
|
didLs <- liftM or . sequence $ [
|
||||||
for' ["ls", "grep"] $
|
for' ["ls", "grep"] $
|
||||||
\x -> warn x 2010 "Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.",
|
\x -> warn x 2010 "Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.",
|
||||||
|
|
Loading…
Reference in New Issue