pgindent: improve formatting of multiline comments.

Enforce this standard formatting of multiline comments that start
in column 1:

/*
 * line 1
 * line 2
 */

Unlike indented comments, we don't reconsider line breaks, except
for forcing the initial /* and trailing */ onto their own lines.
We do make each line start with " *", with some whitespace following.

We preserve pgindent's existing behavior of not touching comments
that begin with /**... or /*-...  Also, if the first line looks like
/* === or /* ---, we don't split that line; similarly for the last
line.

The vast majority of multiline comments in our tree already look
like this, but this change will clean up some stragglers.

Author: Aleksander Alekseev <[email protected]>
Reported-by: Michael Paquier <[email protected]>
Reviewed-by: Arseniy Mukhin <[email protected]>
Reviewed-by: Nathan Bossart <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: 
https://postgr.es/m/CAJ7c6TPQ0kkHQG-AqeAJ3PV_YtmDzcc7s%2B_V4%3Dt%2BxgSnZm1cFw%40mail.gmail.com
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/60f9467c38348e06ad96815d4394651dd02a0389

Modified Files
--------------
src/tools/pgindent/pgindent | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Reply via email to