Re: pgindent (probably my missing something obvious) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgindent (probably my missing something obvious)
Date
Msg-id 475710.1688436261@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgindent (probably my missing something obvious)  (James Coleman <jtc331@gmail.com>)
List pgsql-hackers
James Coleman <jtc331@gmail.com> writes:
> My heuristic for what pgindent changes must be wrong. The long
> function calls (and 'if' conditions) seem obviously out of place to my
> eyes with the surrounding code. Does that mean the surrounding code
> was just hand-prettified?

pgindent won't usually editorialize on line breaks within C
statements.  (It *will* re-flow comment text, if the comment block
isn't at the left margin.)  It seems to feel free to play with
horizontal whitespace, but not to add or remove newlines within a
statement.  I do know that it will move curly braces around to meet
formatting rules, but I've not seen it do similar changes within a
function call or if-condition.  So it's up to you to break the lines
in a reasonable way.

            regards, tom lane



pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: pgindent (probably my missing something obvious)
Next
From: Ibrar Ahmed
Date:
Subject: Re: Commitfest manager for July