On 2023-01-23 Mo 09:49, Jelte Fennema wrote:
> Indeed the flags you added are enough. Attached is a patch
> that adds an updated pre-commit hook with the same behaviour
> as the one before. I definitely think having a pre-commit hook
> in the repo is beneficial, since writing one that works in all
> cases definitely takes some time.
I didn't really like your hook, as it forces a reindent, and many people
won't want that (for reasons given elsewhere in this thread).
Here's an extract from my pre-commit hook that does that if PGAUTOINDENT
is set to "yes", and otherwise just warns you that you need to run pgindent.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com