mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 05:21:34 -07:00
Disable SC2257 about > $((i=42)) for Dash
This commit is contained in:
parent
a30e42ab05
commit
01f4423465
1 changed files with 2 additions and 1 deletions
|
@ -3596,7 +3596,8 @@ prop_checkModifiedArithmeticInRedirection2 = verify checkModifiedArithmeticInRed
|
||||||
prop_checkModifiedArithmeticInRedirection3 = verifyNot checkModifiedArithmeticInRedirection "while true; do true; done > $((i++))"
|
prop_checkModifiedArithmeticInRedirection3 = verifyNot checkModifiedArithmeticInRedirection "while true; do true; done > $((i++))"
|
||||||
prop_checkModifiedArithmeticInRedirection4 = verify checkModifiedArithmeticInRedirection "cat <<< $((i++))"
|
prop_checkModifiedArithmeticInRedirection4 = verify checkModifiedArithmeticInRedirection "cat <<< $((i++))"
|
||||||
prop_checkModifiedArithmeticInRedirection5 = verify checkModifiedArithmeticInRedirection "cat << foo\n$((i++))\nfoo\n"
|
prop_checkModifiedArithmeticInRedirection5 = verify checkModifiedArithmeticInRedirection "cat << foo\n$((i++))\nfoo\n"
|
||||||
checkModifiedArithmeticInRedirection _ t =
|
prop_checkModifiedArithmeticInRedirection6 = verifyNot checkModifiedArithmeticInRedirection "#!/bin/dash\nls > $((i=i+1))"
|
||||||
|
checkModifiedArithmeticInRedirection params t = unless (shellType params == Dash) $
|
||||||
case t of
|
case t of
|
||||||
T_Redirecting _ redirs (T_SimpleCommand _ _ (_:_)) -> mapM_ checkRedirs redirs
|
T_Redirecting _ redirs (T_SimpleCommand _ _ (_:_)) -> mapM_ checkRedirs redirs
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue