chainlint.sed: stop throwing away here-doc tags

The purpose of chainlint is to highlight problems it finds in test code
by inserting annotations at the location of each problem. Arbitrarily
eliding bits of the code it is checking is not helpful, yet this is
exactly what chainlint.sed does by cavalierly and unnecessarily dropping
the here-doc operator and tag; i.e. `cat <<TAG` becomes simply `cat` in
the output. This behavior can make it more difficult for the test writer
to align the annotated output of chainlint.sed with the original test
code. Address this by retaining here-doc tags.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Eric Sunshine
2021-12-13 01:30:57 -05:00
committed by Junio C Hamano
parent 22597af97d
commit 34ba05c296
11 changed files with 35 additions and 29 deletions

View File

@ -2,7 +2,7 @@
while true
do
echo foo ?!AMP?!
cat
cat <<-EOF
done ?!AMP?!
while true; do
echo foo &&