Re: run pgindent on a regular basis / scripted manner
Peter Geoghegan <pg@bowt.ie>
On Mon, Oct 16, 2023 at 5:45 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Two thoughts about that: > > 1. We should not commit indent fixups on behalf of somebody else's > misindented commit. Peer pressure on committers who aren't being > careful about this is the only way to improve matters; so complain > to the person at fault until they fix it. Thomas Munro's recent commit 01529c704008 was added to .git-blame-ignore-revs by Michael Paquier, despite the fact that Munro's commit technically isn't just a pure indentation fix (it also fixed some typos). It's hard to judge Michael too harshly for this, since in general it's harder to commit things when koel is already complaining about existing misindetation -- I get why he'd prefer to take care of that first. > 2. We could raise awareness of this issue by adding indent verification > to CI testing. I hesitate to suggest that, though, for a couple of > reasons: > 2a. It seems fairly expensive, though I might be misjudging. > 2b. It's often pretty handy to submit patches that aren't fully > indent-clean; I have such a patch in flight right now at [1]. It's also often handy to make a minor change to a comment or something at the last minute, without necessarily having the comment indented perfectly. > 2b could be ameliorated by making the indent check be a separate > test process that doesn't obscure the results of other testing. I was hoping that "go back to the old status quo" would also appear as an option. My main objection to the new policy is that it's not quite clear what process I should go through in order to be 100% confident that koel won't start whining (short of waiting around for koel to whine). I know how to run pgindent, of course, and haven't had any problems so far...but it still seems quite haphazard. If we're going to make this a hard rule, enforced on every commit, it should be dead easy to comply with the rule. -- Peter Geoghegan
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix comment from commit 22655aa231.
- 01529c704008 17.0 cited
-
Add a few recent commits to .git-blame-ignore-revs.
- 0df7d1da40e3 17.0 landed
-
Pre-beta2 mechanical code beautification.
- b334612b8aee 16.0 landed
-
Pre-beta mechanical code beautification.
- 0245f8db36f3 16.0 landed
-
Make agreed-on updates in perltidy options.
- df6b19fbbc20 16.0 landed
-
Remove obsolete pgindent options --code-base and --build
- b16259b3c189 16.0 landed
-
Integrate pg_bsd_indent into our build/test infrastructure.
- 156c049beed9 16.0 landed
-
Sync pg_bsd_indent's copyright notices with Postgres practice.
- b44e5fced3e5 16.0 landed
-
Import pg_bsd_indent sources.
- 4e831f4cee14 16.0 landed
-
pgindent: filter files for the --commit option
- dab07e8c6896 16.0 landed
-
pgindent: more ways to find files to indent
- 068a243b7771 16.0 landed
-
Fix pgindent --show-diff option.
- 62e1e28bf769 16.0 cited
-
Add non-destructive modes to pgindent
- b90f0b57474e 16.0 landed
-
Initial pgindent run with pg_bsd_indent version 2.0.
- e3860ffa4dd0 10.0 cited