Re: cfbot run pgindent? - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: cfbot run pgindent?
Date
Msg-id CAEepm=1D4_wypsYgfZgK-vPx04FJgDx53PG9KXsA+WWG6MrGpA@mail.gmail.com
Whole thread Raw
In response to Re: cfbot run pgindent?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Wed, Dec 19, 2018 at 8:08 AM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 18/12/2018 19:50, Robbie Harwood wrote:
> > Second, since the project does have a defined style checker, do you
> > think it would be possible to run it as part of cfbot and report errors?
>
> pgindent is a code formatter, not a style checker.  Using it to check
> whether just the newly added code is correctly formatted would probably
> require that all existing code is correctly formatted at all times,
> which isn't the case.
>
> What cfbot could do is spit out a diff at the end between the current
> code and the pgindent'ed version.  That might be useful in some cases.

pgindent has the problem of that typename list that is maintained by
mysterious manual means, so it might be noisy.

I think that in general any extra checks (for example perl scripts
that check that nodes have all the right boilerplate, read/write
functions etc, wait points have names and documentation, ... etc as
discussed a while back) might as well be in-tree and runnable from the
makefile so that everyone can run them directly if they want, and then
cfbot could too.

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: cfbot run pgindent?
Next
From: Andres Freund
Date:
Subject: Use an enum for RELKIND_*?