This commit fixes #803

This commit is contained in:
Scorpiokat 2017-01-03 14:55:12 +00:00
parent 96168fc707
commit 40907b1636
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ checkPipePitfalls _ (T_Pipeline id _ commands) = do
let flagsGrep = fromMaybe [] $ map snd <$> getAllFlags <$> getCommand grep let flagsGrep = fromMaybe [] $ map snd <$> getAllFlags <$> getCommand grep
flagsWc = fromMaybe [] $ map snd <$> getAllFlags <$> getCommand wc flagsWc = fromMaybe [] $ map snd <$> getAllFlags <$> getCommand wc
in in
unless ((any (`elem` ["o", "only-matching"]) flagsGrep) || (any (`elem` ["m", "chars", "w", "words", "c", "bytes", "L", "max-line-length"]) flagsWc) || ((length flagsWc) == 0)) $ unless ((any (`elem` ["o", "only-matching", "r", "R", "recursive"]) flagsGrep) || (any (`elem` ["m", "chars", "w", "words", "c", "bytes", "L", "max-line-length"]) flagsWc) || ((length flagsWc) == 0)) $
style (getId grep) 2126 "Consider using grep -c instead of grep|wc -l." style (getId grep) 2126 "Consider using grep -c instead of grep|wc -l."
didLs <- liftM or . sequence $ [ didLs <- liftM or . sequence $ [