archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <>
To: Junio C Hamano <>
Cc: Eric Sunshine via GitGitGadget <>,
	Git List <>, Jeff King <>
Subject: Re: [PATCH] chainlint: colorize problem annotations and test delimiters
Date: Mon, 12 Sep 2022 20:14:27 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <xmqqsfkwb12i.fsf@gitster.g>

On Mon, Sep 12, 2022 at 7:55 PM Junio C Hamano <> wrote:
> "Eric Sunshine via GitGitGadget" <> writes:
> > +     $checked =~ s/(\?![^?]+\?!)/$c->{bold}$c->{red}$1$c->{reset}/mg;
> It may be just me, but coloring the whole "?!LOOP?!" in red feels a
> bit strange.  I would have expected more like
>         if ($c->{color_in_use}) {
>                 $checked =~ s/\?!([^?]+)\?!/$c->{bold}$c->{red}$1$c->{reset}/mg;
>         }
> IOW, switching between "?!LOOP?!" and "<BOLD><RED>LOOP<RESET>".
> But it may be just me.

That's possible, but I'd rather not do that for a couple reasons:

(1) Even with the coloring, I still find it handy to be able to search
for "?!" in the output in order to jump to the next problem (or to
filter to just the problem lines via, say, grep).

(2) In practice, I found that even after coloring those annotations in
red, it was still easy for the eye to glide right over them in the
output without really noticing them. Switching it to bold red helped a
bit, but my eye still glided over them sometimes. One possible reason
that the eye was able to glide over them may be because the "?!FOO?!"
annotations are very short bits of text buried in the much larger and
textually noisy test body. As such, having more characters "?!...?!"
may help capture the eye more easily than fewer characters. (In fact,
I briefly considered coloring the entire line red to combat the
eye-gliding problem but wasn't sure if that would be helpful or

  reply	other threads:[~2022-09-13  0:14 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 [this message]
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   `'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
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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* 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).