Re: pgindent vs. git whitespace check - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgindent vs. git whitespace check
Date
Msg-id 42726.1677077534@sss.pgh.pa.us
Whole thread Raw
In response to pgindent vs. git whitespace check  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: pgindent vs. git whitespace check
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> Commit e4602483e95 accidentally introduced a situation where pgindent
> disagrees with the git whitespace check.  The code is

>          conn = libpqsrv_connect_params(keywords, values,
>                                          /* expand_dbname = */ false,
>                                         PG_WAIT_EXTENSION);

> where the current source file has 4 spaces before the /*, and the
> whitespace check says that that should be a tab.

Hmm, I don't think that's per project style in the first place.
Most places that annotate function arguments do it like

         conn = libpqsrv_connect_params(keywords, values,
                                        false, /* expand_dbname */
                                        PG_WAIT_EXTENSION);

pgindent has never been very kind to non-end-of-line comments, and
I'm not excited about working on making it do so.  As a thought
experiment, what would happen if we reversed course and started
allowing "//" comments?  Naive conversion of this comment could
break the code altogether.  (Plenty of programming languages
don't even *have* non-end-of-line comments.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgindent vs. git whitespace check
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: logical decoding and replication of sequences, take 2