Re: CI: Add task that runs pgindent
| От | Florents Tselai |
|---|---|
| Тема | Re: CI: Add task that runs pgindent |
| Дата | |
| Msg-id | B046068D-CB91-4B2B-9148-FBA4E684D915@gmail.com обсуждение исходный текст |
| Ответ на | CI: Add task that runs pgindent ("Jelte Fennema-Nio" <me@jeltef.nl>) |
| Ответы |
Re: CI: Add task that runs pgindent
|
| Список | pgsql-hackers |
> On 21 Oct 2025, at 3:19 PM, Jelte Fennema-Nio <me@jeltef.nl> wrote: > > At PGConf.dev 2025 one thing that came up in the "Scaling PostgreSQL > Development" unconference session is that new hackers don't know all the > details of our development flow by heart yet. Of course it's documented > on the wiki, but even if they find the relevant wiki pages they often > still miss/forget things. One of the things they often forget is > formatting their code. The consensus at that session was that it was > probably worth adding a CI task for this to nudge newcomers to indent > their code. > > We're not too worried about this new requirement scaring away newcomers, > since autoformatting has become fairly commonplace in open source > development. Also committers can of course still choose to format the > patch themselves before committing if the formatting is failing. > > This might also help reduce the number of unindented commits that > committers push, which require a follow up "fix indent" commit to make > the koel buildfarm animal happy again. > <v1-0001-CI-Add-task-that-runs-pgindent.patch> I wonder if adding a pre-commit Git hook (for example under .git/hooks/pre-commit) might be an equally or even more suitableway to handle this? That wouldn’t preclude having a CI task as well, of course. The hook would mainly help contributors catch formatting issues locally, while the CI task would serve as a failsafe forcommitters.
В списке pgsql-hackers по дате отправления: