From: Eric Sunshine <sunshine@sunshineco.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Eric Sunshine via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Jeff King <peff@peff.net>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: chainlint.pl's new "deparse" output (was: [PATCH v2] [...])
Date: Tue, 25 Oct 2022 00:15:45 -0400 [thread overview]
Message-ID: <CAPig+cQhsGpOa1XqfOj-zV1esc_uEkOPGg3hVUkSWrkVma+GNQ@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cT=cWYT6kicNWT+6RxfiKKMyVz72H3_9kwkF-f4Vuoe1w@mail.gmail.com>
On Tue, Oct 25, 2022 at 12:05 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Mon, Oct 24, 2022 at 6:28 AM Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
> > Another thing: When a test *ends* in a "&&" (common when you copy/paste
> > e.g. "test_cmp expect actual &&\n" from another test) it doesn't spot
> > it, but instead we get all the way to the eval/117, i.e. "broken
> > &&-chain or run-away HERE-DOC".
>
> Yes, I recall considering that case and others, but decided that
> that's probably outside the scope of the linter. [...]
>
> It is unfortunate, though, that the shell's "syntax error" output gets
> swallowed by the eval/117 checker in test-lib.sh and turned into a
> somewhat less useful message. I'm not quite sure how we can fix the
> eval/117 checker to not swallow genuine syntax errors like that,
> unless we perhaps specially recognize exit code 2 and, um, do
> something...
Another "fix" would be to drop the eval/117 checker altogether. I
retained it as a final safeguard in case something slipped past
chainlint.pl, however, I'm not sure how much value the eval/117
checker really has since it misses so many real-world cases, such as
any &&-chain break in the body of a compound context (if/fi,
case/esac, for/done, while/done, (...), {...}, $(...), etc.).
Moreover, we see now that it's also obscuring useful error messages
(such as "syntax error") from the shell itself. So, dropping it may be
an option(?).
next prev parent reply other threads:[~2022-10-25 4:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 23:04 [PATCH] chainlint: colorize problem annotations and test delimiters Eric Sunshine via GitGitGadget
2022-09-12 23:55 ` Junio C Hamano
2022-09-13 0:14 ` Eric Sunshine
2022-09-13 0:21 ` Junio C Hamano
2022-09-13 0:39 ` Eric Sunshine
2022-09-13 0:16 ` Jeff King
2022-09-13 0:15 ` Jeff King
2022-09-13 0:30 ` Eric Sunshine
2022-09-13 1:34 ` Jeff King
2022-09-13 0:32 ` Jeff King
2022-09-13 4:01 ` [PATCH v2] " Eric Sunshine via GitGitGadget
2022-09-13 20:40 ` Jeff King
2022-09-13 20:46 ` Junio C Hamano
2022-10-24 9:57 ` Ævar Arnfjörð Bjarmason
2022-10-24 9:57 ` chainlint.pl's new "deparse" output (was: [PATCH v2] [...]) Ævar Arnfjörð Bjarmason
2022-10-25 4:05 ` Eric Sunshine
2022-10-25 4:15 ` Eric Sunshine [this message]
2022-10-25 10:07 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPig+cQhsGpOa1XqfOj-zV1esc_uEkOPGg3hVUkSWrkVma+GNQ@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).