@@ -394,7 +394,7 @@ prop_checkAssignAteCommand4 = verifyNot checkAssignAteCommand "A=foo ls -l"
394
394
prop_checkAssignAteCommand5 = verify checkAssignAteCommand " PAGER=cat grep bar"
395
395
prop_checkAssignAteCommand6 = verifyNot checkAssignAteCommand " PAGER=\" cat\" grep bar"
396
396
prop_checkAssignAteCommand7 = verify checkAssignAteCommand " here=pwd"
397
- checkAssignAteCommand _ (T_SimpleCommand id ( T_Assignment _ _ _ _ assignmentTerm: [] ) list) =
397
+ checkAssignAteCommand _ (T_SimpleCommand id [ T_Assignment _ _ _ _ assignmentTerm] list) =
398
398
-- Check if first word is intended as an argument (flag or glob).
399
399
if firstWordIsArg list
400
400
then
@@ -426,7 +426,7 @@ checkArithmeticOpCommand _ _ = return ()
426
426
427
427
prop_checkWrongArit = verify checkWrongArithmeticAssignment " i=i+1"
428
428
prop_checkWrongArit2 = verify checkWrongArithmeticAssignment " n=2; i=n*2"
429
- checkWrongArithmeticAssignment params (T_SimpleCommand id ( T_Assignment _ _ _ _ val: [] ) [] ) =
429
+ checkWrongArithmeticAssignment params (T_SimpleCommand id [ T_Assignment _ _ _ _ val] [] ) =
430
430
sequence_ $ do
431
431
str <- getNormalString val
432
432
match <- matchRegex regex str
@@ -2844,7 +2844,7 @@ checkTestArgumentSplitting params t =
2844
2844
then
2845
2845
-- Ksh appears to stop processing after unrecognized tokens, so operators
2846
2846
-- will effectively work with globs, but only the first match.
2847
- when (op `elem` [' -' : c : [ ] | c <- " bcdfgkprsuwxLhNOGRS" ]) $
2847
+ when (op `elem` [[ ' -' , c ] | c <- " bcdfgkprsuwxLhNOGRS" ]) $
2848
2848
warn (getId token) 2245 $
2849
2849
op ++ " only applies to the first expansion of this glob. Use a loop to check any/all."
2850
2850
else
0 commit comments