Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-06-23 Thread Aleksander Alekseev
Hi Arseniy, Thanks for the feedback! > Now it affects 4 times more files (380). What I noticed: > 1) Most of the comments are bordered comments like this: > -/* > > +/* > + * > -

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-06-21 Thread Arseniy Mukhin
On Fri, Jun 20, 2025 at 5:01 PM Aleksander Alekseev wrote: > > Hi, > > > Given the quality of BSD indent code, I have _always_ found it easier to > > modify pgindent. ;- > > :D Initially I thought that the problem was simple enough to solve it > in C, but this turned out not to be true. > > > It'

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-06-20 Thread Bruce Momjian
On Fri, Jun 20, 2025 at 05:01:41PM +0300, Aleksander Alekseev wrote: > Hi, > > > Given the quality of BSD indent code, I have _always_ found it easier to > > modify pgindent. ;- > > :D Initially I thought that the problem was simple enough to solve it > in C, but this turned out not to be true.

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-06-20 Thread Bruce Momjian
On Fri, Jun 20, 2025 at 04:44:08PM +0300, Aleksander Alekseev wrote: > Hi Arseniy, > > > I tried it with the whole project and almost always it works great. > > But I noticed two cases where it works probably not as expected: > > > > 1) comments which don't have a star on each line. For example: >

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-06-20 Thread Aleksander Alekseev
Hi, > Given the quality of BSD indent code, I have _always_ found it easier to > modify pgindent. ;- :D Initially I thought that the problem was simple enough to solve it in C, but this turned out not to be true. > It's going to be simpler to modify pgindent then. PFA the updated patch. I noti

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-06-20 Thread Aleksander Alekseev
Hi Arseniy, > I tried it with the whole project and almost always it works great. > But I noticed two cases where it works probably not as expected: > > 1) comments which don't have a star on each line. For example: > file 'cube.c' > > before: > /* make up a metric in which one box will be 'lower'

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-06-19 Thread Arseniy Mukhin
On Thu, Jun 19, 2025 at 5:51 PM Aleksander Alekseev wrote: > > Hi, > > Michael (cc:'ed) pointed out [1] that pg_bsd_indent could do a > slightly better job when it comes to formatting multiline comments. I > prepared a patch that fixes this. > > How to test it: > > ``` > ninja -C build > cp build/