git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] chainlint: colorize problem annotations and test delimiters

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 13, 2022, 00:14 UTC
Message-ID
<CAPig+cTq3j5M7cz3T14h9U6e+H5PAu8JJ_Svq87W3WviwS6_qA@mail.gmail.com>
In-Reply-To
<xmqqsfkwb12i.fsf@gitster.g>
On Mon, Sep 12, 2022 at 7:55 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> "Eric Sunshine via GitGitGadget" <gitgitgadget@gmail.com> 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 hurtful.)

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 18 in “chainlint: colorize problem annotations and test delimiters”
  1. chainlint: colorize problem annotations and test delimitersEric Sunshine via GitGitGadget, Sep 12, 2022
  2. Junio C HamanoSep 12, 2022
  3. Eric SunshineSep 13, 2022
  4. Junio C HamanoSep 13, 2022
  5. Eric SunshineSep 13, 2022
  6. Jeff KingSep 13, 2022
  7. Jeff KingSep 13, 2022
  8. Eric SunshineSep 13, 2022
  9. Jeff KingSep 13, 2022
  10. Jeff KingSep 13, 2022
  11. chainlint: colorize problem annotations and test delimitersEric Sunshine via GitGitGadget, Sep 13, 2022
  12. Jeff KingSep 13, 2022
  13. Junio C HamanoSep 13, 2022
  14. Ævar Arnfjörð BjarmasonOct 24, 2022
  15. chainlint.pl's new "deparse" output (was: [PATCH v2] [...])Ævar Arnfjörð Bjarmason, Oct 24, 2022
  16. Eric SunshineOct 25, 2022
  17. Eric SunshineOct 25, 2022
  18. Ævar Arnfjörð BjarmasonOct 25, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.