Re: [PATCH 1/2] chainlint: make error messages self-explanatory
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Aug 29, 2024, 18:10 UTC
- Message-ID
- <CAPig+cSWoQ8pkdy3gyRQFUwoQ5ZytK9HjobHd3EJxdFRJhDWxQ@mail.gmail.com>
- In-Reply-To
- <20240829170712.GA405209@coredump.intra.peff.net>
On Thu, Aug 29, 2024 at 1:07 PM Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> On Thu, Aug 29, 2024 at 12:03:33PM +0200, Patrick Steinhardt wrote: > > I find the resulting error messages a bit confusing: to me it reads as > > if "ERR" is missing the ampersands. Is it actually useful to have the > > ERR prefix in the first place? We do not output anything but errors, so > > it feels somewhat redundant. > > I wonder if coloring "ERR" differently, or perhaps even adding a colon, > like "ERR: ", would make it stand out more.
I considered both of these ideas. Coloring "ERR" was dismissed almost immediately due to the (admittedly tiny) bit of extra complexity and the minimal color palette available (and since I couldn't trust myself to not waste an inordinate amount of time trying to arrive at the perfect color combination).
My first draft did place a colon after "ERR", but it seemed unnecessarily noisy, so I dropped it. However, I don't feel overly strongly about it and can add it back if people think it would be helpful.
> FWIW, I find the existing error messages pretty readable, but that is > probably a sign that my mind has been poisoned by using chainlint too > much already. ;)
Goal achieved.