Re: run pgindent on a regular basis / scripted manner
David Rowley <dgrowleyml@gmail.com>
On Wed, 18 Oct 2023 at 22:07, Jelte Fennema <postgres@jeltef.nl> wrote: > But based on the contents of the fixup commits a commonality seems to > be that the fixup only fixes a few lines, quite often touching only > comments. So it seems like the main reason for breaking koel is > forgetting to re-run pgindent after some final cleanup/wording > changes/typo fixes. And that seems like an expected flaw of being > human instead of a robot, which can only be worked around with better > automation. I wonder if you might just be assuming these were caused by last-minute comment adjustments. I may have missed something on the thread, but it could be that, or it could be due to the fact that pgindent just simply does more adjustments to comments than it does with code lines. On Wed, 18 Oct 2023 at 06:40, David Rowley <dgrowleyml@gmail.com> wrote: > > I agree that it's not nice to add yet another way of breaking the > > buildfarm and even more so when the committer did make check-world > > before committing. We have --enable-tap-tests, we could have > > --enable-indent-checks and have pgindent check the code is correctly > > indented during make check-world. Then just not have > > --enable-indent-checks in CI. > > I think --enable-indent-checks sounds like a good improvement to the > status quo. But I'm not confident that it will help remove the cases > where only a comment needs to be re-indented. Do commiters really > always run check-world again when only changing a typo in a comment? I > know I probably wouldn't (or at least not always). I can't speak for others, but I always make edits in a dev branch and do "make check-world" before doing "git format-patch" before I "git am" that patch into a clean repo. Before I push, I'll always run "make check-world" again as sometimes master might have moved on a few commits from where the dev branch was taken (perhaps I need to update the expected output of some newly added EXPLAIN tests if say doing a planner adjustment). I personally never adjust any code or comments after the git am. I only sometimes adjust the commit message. So, in theory at least, if --enable-indent-checks existed and I used it, I shouldn't break koel... let's see if I just jinxed myself. It would be good to learn how many of the committers out of the ones you listed that --enable-indent-checks would have saved from breaking koel. David
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