From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Eric Sunshine <ericsunshine@charter.net>,
git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH 2/2] chainlint: reduce annotation noise-factor
Date: Fri, 30 Aug 2024 16:51:30 -0700 [thread overview]
Message-ID: <xmqqle0dpo1p.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cSZ8Sot9oq+rmzBTmQU-Fnay92roTO=Mk0uT+-JUzMcXw@mail.gmail.com> (Eric Sunshine's message of "Fri, 30 Aug 2024 19:30:09 -0400")
Eric Sunshine <sunshine@sunshineco.com> writes:
> It may be possible to do something like this instead (untested), but
> I'm not sure it's worth the complexity:
>
> $checked .= substr($body, $start, $pos - $start);
> $checked .= ' ' unless $checked =~ /\s$/;
> $checked .= "$erropenERR $err$errclose";
> $checked .= ' ' unless $pos + 1 >= length($body) ||
> substr($body, $pos + 1, 1) =~ /\s/;
I think the complexity you mention is the updates to existing code
to get to the above end state? Using some setup like ...
($erropen, errclose) =
$colored_output ? ("?!", "?!") : ("<RED>", "<RESET>");
... and then using a code like the above would be quite
straightforward and the end result cannot become simpler than that
;-)
> As first implemented, there was no structured "problem description".
> chainlint originally just output a stream of raw parse tokens (not the
> original test text), and when a problem was discovered the "?!...?!"
> annotations were embedded directly in the output stream. This was
> still the case even when colored output was implemented[1]; in fact,
> the annotations were colored after-the-fact by searching for "?!...?!"
> in the output stream. It was only when chainlint was taught to output
> the original test text verbatim[2] that problem descriptions became
> structured data.
Exactly.
Thanks.
next prev parent reply other threads:[~2024-08-30 23:51 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 9:16 [PATCH 0/2] make chainlint output more newcomer-friendly Eric Sunshine
2024-08-29 9:16 ` [PATCH 1/2] chainlint: make error messages self-explanatory Eric Sunshine
2024-08-29 10:03 ` Patrick Steinhardt
2024-08-29 17:07 ` Jeff King
2024-08-29 18:10 ` Eric Sunshine
2024-08-29 18:01 ` Eric Sunshine
2024-08-29 15:39 ` Junio C Hamano
2024-08-29 22:04 ` Eric Sunshine
2024-08-30 18:41 ` Junio C Hamano
2024-08-29 9:16 ` [PATCH 2/2] chainlint: reduce annotation noise-factor Eric Sunshine
2024-08-29 10:03 ` Patrick Steinhardt
2024-08-29 17:10 ` Jeff King
2024-08-29 18:37 ` Eric Sunshine
2024-08-29 18:28 ` Eric Sunshine
2024-08-29 15:55 ` Junio C Hamano
2024-08-30 23:30 ` Eric Sunshine
2024-08-30 23:51 ` Junio C Hamano [this message]
2024-09-10 4:10 ` [PATCH v2 0/3] make chainlint output more newcomer-friendly Eric Sunshine
2024-09-10 4:10 ` [PATCH v2 1/3] chainlint: don't be fooled by "?!...?!" in test body Eric Sunshine
2024-09-10 16:48 ` Junio C Hamano
2024-09-10 4:10 ` [PATCH v2 2/3] chainlint: make error messages self-explanatory Eric Sunshine
2024-09-10 7:48 ` Patrick Steinhardt
2024-09-10 4:10 ` [PATCH v2 3/3] chainlint: reduce annotation noise-factor Eric Sunshine
2024-09-10 7:48 ` Patrick Steinhardt
2024-09-10 8:14 ` Eric Sunshine
2024-09-10 15:42 ` Junio C Hamano
2024-09-10 22:17 ` Eric Sunshine
2024-09-10 6:44 ` [PATCH v2 0/3] make chainlint output more newcomer-friendly Jeff King
2024-09-10 17:31 ` Junio C Hamano
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=xmqqle0dpo1p.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=ericsunshine@charter.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
/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).