* Re: [gentoo-portage-dev] [PROPOSAL] Don't split user visible messages across multiple lines
@ 2017-03-15 22:32 99% ` Brian Dolbec
0 siblings, 0 replies; 1+ results
From: Brian Dolbec @ 2017-03-15 22:32 UTC (permalink / raw
To: gentoo-portage-dev
On Mon, 27 Feb 2017 20:33:28 +0200
Alexandru Elisei <alexandru.elisei@gmail.com> wrote:
> I was working on emerge --sync and my test repo configuration
> generated several warning messages. Finding the exact location where
> the warnings was generated was surprisingly difficult because the
> message string was split across three lines due to the 80 character
> line limit and I had to grep for different patterns until I found one
> that matched part of a line.
>
> I propose that messages that are visible to the user never be split
> across multiple lines. This is also the coding style convention used
> by the linux kernel:
> https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
>
> If accepted, this could go in the DEVELOPING file.
>
That could be pretty hard to do for all messages.
Especially messages with embedded data
eg: "%s is missing %s required use flag..." % ('sys-apps/foo', 'bar')
I know I don't always enforce the line length for a few characters,
also when clarity is more important than line length.
We could also increase the max. line length to something like 120 or 130.
--
Brian Dolbec <dolsen>
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-02-27 18:33 [gentoo-portage-dev] [PROPOSAL] Don't split user visible messages across multiple lines Alexandru Elisei
2017-03-15 22:32 99% ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox