chainlint.sed: improve ?!SEMI?! placement accuracy
commitfbd992b61b3acb6ce235d678bfe65a60c503dddd
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 13 Dec 2021 06:30:51 +0000 (13 01:30 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2021 22:15:29 +0000 (13 14:15 -0800)
treec2d935f19361d54ef0cebae4a2da36aff301c445
parentdb8c7a1cc02e545dd75b55e2ccbab2de51cd06ae
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>
t/chainlint.sed
t/chainlint/negated-one-liner.expect
t/chainlint/one-liner.expect
t/chainlint/semicolon.expect
t/chainlint/subshell-one-liner.expect