Tweaked some messages and added more badcases

This commit is contained in:
Vidar Holen
2012-11-04 21:44:48 -08:00
parent 279e972b61
commit 67d27ea42d
22 changed files with 60 additions and 16 deletions

View File

@@ -67,7 +67,7 @@ checkBasic f s = case parseShell "-" s of
prop_checkUuoc = verify checkUuoc "cat foo | grep bar"
checkUuoc (T_Pipeline _ (T_Redirecting _ _ f@(T_SimpleCommand id _ _):_:_)) =
case deadSimple f of ["cat", _] -> addNoteFor id $ Note InfoC "UUOC: 'cat foo | bar | baz' is better written as 'bar < foo | baz'"
case deadSimple f of ["cat", _] -> addNoteFor id $ Note StyleC "Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead."
_ -> return ()
checkUuoc _ = return ()