Re: Preliminary results for proposed new pgindent implementation
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>,
Stephen Frost <sfrost@snowman.net>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Piotr Stefaniak <postgres@piotr-stefaniak.me>
Date: 2017-06-16T17:34:01Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > I think the current logic is pretty horrible, primarily because it's so > hard to get to manually. Yes, I think that's really the big argument against it: no editor on the face of the planet will indent code that way to start with. > I could live with both of these proposed > changes, the selection of the changes you posted looks like it could be > improved by code changes, but that's obviously a large amount of work. In the end, the only thing that fixes this sort of stuff is to be more rigid about making the code fit into 80 columns to begin with. I get the impression though that a lot of people work in editor windows that are wider than that, so the code looks fine to them when it slops over a bit. > At this point however I wonder whether just moving to the new tool on > its own wouldn't be a big enough change - we could just delay that > decision until we've got the rest done at least. I'm torn between that approach and "let's just have one big flag day and get it over with". I think having the rules incrementally changing from one release to the next will be a huge headache. I do intend to apply the diffs to HEAD in multiple steps, just to make them more reviewable. But I think we should probably absorb all the changes we want into v10, not leave some for later cycles. regards, tom lane
Commits
-
Manually un-break a few URLs that pgindent used to insist on splitting.
- 780b3a4c43fd 10.0 landed
-
Remove entab and associated detritus.
- 81f056c7256f 10.0 landed
-
Phase 3 of pgindent updates.
- 382ceffdf7f6 10.0 landed
-
Phase 2 of pgindent updates.
- c7b8998ebbf3 10.0 landed
-
Initial pgindent run with pg_bsd_indent version 2.0.
- e3860ffa4dd0 10.0 landed
-
Adjust pgindent script to use pg_bsd_indent 2.0.
- 8ff6d4ec7840 10.0 landed
-
Final pgindent run with old pg_bsd_indent (version 1.3).
- 9ef2dbefc7fb 10.0 landed