diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2021-12-13 09:30:51 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-14 01:15:29 +0300 |
commit | fbd992b61b3acb6ce235d678bfe65a60c503dddd (patch) | |
tree | c2d935f19361d54ef0cebae4a2da36aff301c445 /t/chainlint/subshell-one-liner.expect | |
parent | db8c7a1cc02e545dd75b55e2ccbab2de51cd06ae (diff) |
chainlint.sed: improve ?!SEMI?! placement accuracy
When chainlint.sed detects commands separated by a semicolon rather than
by `&&`, it places a ?!SEMI?! annotation at the beginning of the line.
However, this is an unusual location for programmers accustomed to error
messages (from compilers, for instance) indicating the exact point of
the problem. Therefore, relocate the ?!SEMI?! annotation to the location
of the semicolon in order to better direct the programmer's attention to
the source of the problem.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/chainlint/subshell-one-liner.expect')
-rw-r--r-- | t/chainlint/subshell-one-liner.expect | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/chainlint/subshell-one-liner.expect b/t/chainlint/subshell-one-liner.expect index ec77aa5b95..432217801b 100644 --- a/t/chainlint/subshell-one-liner.expect +++ b/t/chainlint/subshell-one-liner.expect @@ -2,13 +2,13 @@ (foo && bar) && (foo && bar) | (foo && bar) >baz && -?!SEMI?! (foo; bar) && -?!SEMI?! (foo; bar) | -?!SEMI?! (foo; bar) >baz && + (foo; ?!SEMI?! bar) && + (foo; ?!SEMI?! bar) | + (foo; ?!SEMI?! bar) >baz && (foo || exit 1) && (foo || exit 1) | (foo || exit 1) >baz && (foo && bar) ?!AMP?! -?!SEMI?! (foo && bar; baz) ?!AMP?! + (foo && bar; ?!SEMI?! baz) ?!AMP?! foobar >) |