0d7131763e
>From inception, when chainlint.sed encountered a line using semicolon to separate commands rather than `&&`, it would insert a ?!SEMI?! annotation at the beginning of the line rather ?!AMP?! even though the &&-chain is also broken by the semicolon. Given a line such as: ?!SEMI?! cmd1; cmd2 && the ?!SEMI?! annotation makes it easier to see what the problem is than if the output had been: ?!AMP?! cmd1; cmd2 && which might confuse the test author into thinking that the linter is broken (since the line clearly ends with `&&`). However, now that the ?!AMP?! an ?!SEMI?! annotations are inserted at the point of breakage rather than at the beginning of the line, and taking into account that both represent a broken &&-chain, there is little reason to distinguish between the two. Using ?!AMP?! alone is sufficient to point the test author at the problem. For instance, in: cmd1; ?!AMP?! cmd2 && cmd3 it is clear that the &&-chain is broken between `cmd1` and `cmd2`. Likewise, in: cmd1 && cmd2 ?!AMP?! cmd3 it is clear that the &&-chain is broken between `cmd2` and `cmd3`. Finally, in: cmd1; ?!AMP?! cmd2 ?!AMP?! cmd3 it is clear that the &&-chain is broken between each command. Hence, there is no longer a good reason to make a distinction between a broken &&-chain due to a semicolon and a broken chain due to a missing `&&` at end-of-line. Therefore, drop the ?!SEMI?! annotation and use ?!AMP?! exclusively. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
arithmetic-expansion.expect | ||
arithmetic-expansion.test | ||
bash-array.expect | ||
bash-array.test | ||
blank-line.expect | ||
blank-line.test | ||
block.expect | ||
block.test | ||
broken-chain.expect | ||
broken-chain.test | ||
case.expect | ||
case.test | ||
close-nested-and-parent-together.expect | ||
close-nested-and-parent-together.test | ||
close-subshell.expect | ||
close-subshell.test | ||
command-substitution.expect | ||
command-substitution.test | ||
comment.expect | ||
comment.test | ||
complex-if-in-cuddled-loop.expect | ||
complex-if-in-cuddled-loop.test | ||
cuddled-if-then-else.expect | ||
cuddled-if-then-else.test | ||
cuddled-loop.expect | ||
cuddled-loop.test | ||
cuddled.expect | ||
cuddled.test | ||
exit-loop.expect | ||
exit-loop.test | ||
exit-subshell.expect | ||
exit-subshell.test | ||
for-loop.expect | ||
for-loop.test | ||
here-doc-close-subshell.expect | ||
here-doc-close-subshell.test | ||
here-doc-multi-line-command-subst.expect | ||
here-doc-multi-line-command-subst.test | ||
here-doc-multi-line-string.expect | ||
here-doc-multi-line-string.test | ||
here-doc.expect | ||
here-doc.test | ||
if-in-loop.expect | ||
if-in-loop.test | ||
if-then-else.expect | ||
if-then-else.test | ||
incomplete-line.expect | ||
incomplete-line.test | ||
inline-comment.expect | ||
inline-comment.test | ||
loop-in-if.expect | ||
loop-in-if.test | ||
multi-line-nested-command-substitution.expect | ||
multi-line-nested-command-substitution.test | ||
multi-line-string.expect | ||
multi-line-string.test | ||
negated-one-liner.expect | ||
negated-one-liner.test | ||
nested-cuddled-subshell.expect | ||
nested-cuddled-subshell.test | ||
nested-here-doc.expect | ||
nested-here-doc.test | ||
nested-subshell-comment.expect | ||
nested-subshell-comment.test | ||
nested-subshell.expect | ||
nested-subshell.test | ||
one-liner.expect | ||
one-liner.test | ||
p4-filespec.expect | ||
p4-filespec.test | ||
pipe.expect | ||
pipe.test | ||
semicolon.expect | ||
semicolon.test | ||
subshell-here-doc.expect | ||
subshell-here-doc.test | ||
subshell-one-liner.expect | ||
subshell-one-liner.test | ||
t7900-subtree.expect | ||
t7900-subtree.test | ||
while-loop.expect | ||
while-loop.test |