pgsql: pgindent: improve formatting of multiline comments.
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 <aleksander@tigerdata.com>
Reported-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: /messages/by-id/CAJ7c6TPQ0kkHQG-AqeAJ3PV_YtmDzcc7s+_V4=t+xgSnZm1cFw@mail.gmail.com
Discussion: /messages/by-id/EB0141C5-ACC2-4F0B-85EA-0E3AFBCE322F@umbc.edu
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/60f9467c38348e06ad96815d4394651dd02a0389
Modified Files
--------------
src/tools/pgindent/pgindent | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)