mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-14 02:27:30 -07:00
Merge eb1f83423d
into 20d11c1c33
This commit is contained in:
commit
e270c2f38e
1 changed files with 7 additions and 0 deletions
|
@ -188,6 +188,7 @@ nodeChecks = [
|
|||
,checkDollarQuoteParen
|
||||
,checkUselessBang
|
||||
,checkTranslatedStringVariable
|
||||
,checkPipelineE
|
||||
,checkModifiedArithmeticInRedirection
|
||||
,checkBlatantRecursion
|
||||
,checkBadTestAndOr
|
||||
|
@ -4130,6 +4131,12 @@ checkUselessBang params t = when (hasSetE params) $ mapM_ check (getNonReturning
|
|||
x:rest -> x : dropLast rest
|
||||
_ -> []
|
||||
|
||||
prop_checkPipelineE1 = verify checkPipelineE "set -e; echo hi && echo hello"
|
||||
prop_checkPipelineE2 = verifyNot checkPipelineE "echo hi && echo hello"
|
||||
checkPipelineE params x@(T_AndIf id _ _) = when (hasSetE params) $
|
||||
info id 3061 "&& operators running with -e set will not exit on error"
|
||||
checkPipelineE _ _ = return ()
|
||||
|
||||
prop_checkModifiedArithmeticInRedirection1 = verify checkModifiedArithmeticInRedirection "ls > $((i++))"
|
||||
prop_checkModifiedArithmeticInRedirection2 = verify checkModifiedArithmeticInRedirection "cat < \"foo$((i++)).txt\""
|
||||
prop_checkModifiedArithmeticInRedirection3 = verifyNot checkModifiedArithmeticInRedirection "while true; do true; done > $((i++))"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue