Re: [HACKERS] Updating line length guidelines

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: [HACKERS] Updating line length guidelines
Дата
Msg-id CAMsr+YFnkN1OPf7ENvk9Q98F++FhC2Ko18Koh4SbaBvM1TSBgg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Updating line length guidelines  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Updating line length guidelines  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On 21 August 2017 at 10:36, Michael Paquier <michael.paquier@gmail.com> wrote:
On Mon, Aug 21, 2017 at 11:30 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sun, Aug 20, 2017 at 10:49 AM, Andres Freund <andres@anarazel.de> wrote:
>> We currently still have the guideline that code should fit into an 80
>> character window. But an increasing amount of the code, and code
>> submissions, don't adhere to that (e.g. copy.c, which triggered me to
>> write this email). And I mean outside of accepted "exceptions" like
>> error messages.  And there's less need for such a relatively tight limit
>> these days.  Perhaps we should up the guideline to 90 or 100 chars?
>
> Or maybe we should go the other way and get a little more rigorous
> about enforcing that limit.  I realize 80 has nothing on its side but
> tradition, but I'm a traditionalist -- and I still do use 80 character
> windows a lot of the time.

+1. FWIW, I find the non-truncation of some error messages a bit
annoying when reading them. And having a 80-character makes things
readable. For long URLs this enforcement makes little sense as those
strings cannot be split, but more effort could be done.

The main argument for not wrapping error messages is grep-ableness.

Personally I'd be fine with 100 or so, but when I'm using buffers side by side, or when I'm working in poor conditions where I've set my terminal to "giant old people text" sizes, I remember the advantages of a width limit.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Updating line length guidelines
Следующее
От: Craig Ringer
Дата:
Сообщение: [HACKERS] shm_mq_wait_internal gets stuck forever on fast shutdown