Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Дата
Msg-id 11874.1495057567@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventivemaintenance in advance of pgindent run.)  (Piotr Stefaniak <postgres@piotr-stefaniak.me>)
Ответы Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventivemaintenance in advance of pgindent run.)
Список pgsql-hackers
Piotr Stefaniak <postgres@piotr-stefaniak.me> writes:
> Full copy of my pgindent attached.  Changes commented below.

Thanks!  I ran this, along with the indent copy I pulled from your
github repo a couple hours ago, over the current PG tree (post
Bruce's run).  I got a diff extending to about 100K lines :-(
which I will not post here.  It seemed like a very large fraction
of that was that old pgindent chooses to use a space rather than
a tab if the tab would only move over one column.  This version
uses a tab anyway.

I hacked around that by putting back a detab/entab step at the end
using the existing subroutines in pgindent.  That about halved the
size of the diff, but it's still too big to post.  Much of what
I'm seeing with this version is randomly different decisions about
how far to indent comments, eg

@@ -101,8 +101,8 @@ typedef struct BloomOptions{   int32       vl_len_;        /* varlena header (do not touch
directly!)*/   int         bloomLength;    /* length of signature in words (not bits!) */
 
-   int         bitSize[INDEX_MAX_KEYS];        /* # of bits generated for
-                                                * each index key */
+   int         bitSize[INDEX_MAX_KEYS];    /* # of bits generated for each
+                                            * index key */} BloomOptions;/*

(I untabified the above fragment in the hope of making it more readable
in email.)

It does seem to be handling formatting around sizeof() calls a lot better
than the old code, as well as function pointer typedefs.  So those are
huge wins.  But can we avoid the changes mentioned above?  I'd like the
new version to only differ in ways that are clear improvements.
        regards, tom lane



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

Предыдущее
От: Noah Misch
Дата:
Сообщение: [HACKERS] Re: Event triggers + table partitioning cause server crash incurrent master
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.