Re: Updating line length guidelines

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Updating line length guidelines
Date: 2017-08-21 17:58:44
Message-ID: 20170821175844.7y5zdu6ifk6rg4gk@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund 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?

I'd rather keep the existing limit, and enforce it more strongly.

With the recent pgindent changes, it's no longer possible to save a few
chars by moving the first (or any) argument of a function to a separate
line; in some cases, we're now forced to make function arguments shorter
in order to meet the 80-char standard. In many cases that means adding
a variable declaration with a short name and a separate assignment.
That seems acceptable to me.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-08-21 18:43:04 Re: Proposal : For Auto-Prewarm.
Previous Message Peter Geoghegan 2017-08-21 16:43:16 Re: Re: ICU collation variant keywords and pg_collation entries (Was: [BUGS] Crash report for some ICU-52 (debian8) COLLATE and work_mem values)