Add pgindent test to check if codebase is correctly formatted

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Cc: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
Subject: Add pgindent test to check if codebase is correctly formatted
Date: 2024-01-17 01:22:23
Message-ID: CYGL6HF4TM36.2TFP4FVTVMB6A@neon.tech
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Had some time to watch code run through an extensive test suite, so
thought I would propose this patch that is probably about 75% of the way
to the stated $subject. I had to add in a hack for Meson, and I couldn't
figure out a good hack for autotools.

I think a good solution would be to distribute pgindent and
pg_bsd_indent. At Neon, we are trying to format our extension code using
pgindent. I am sure there are other extension authors out there too that
format using pgindent. Distributing pg_bsd_indent and pgindent in the
postgresql-devel package would be a great help to those of us that
pgindent out of tree code. It would also have the added benefit of
adding the tools to $PREFIX/bin, which would make the test that I added
not need a hack to get the pg_bsd_indent executable.

--
Tristan Partin
Neon (https://neon.tech)

Attachment Content-Type Size
v1-0001-Allow-tests-to-register-command-line-arguments-in.patch text/x-patch 989 bytes
v1-0002-Add-pgindent-test-to-check-if-codebase-is-correct.patch text/x-patch 3.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2024-01-17 01:27:40 Re: Add pgindent test to check if codebase is correctly formatted
Previous Message Bharath Rupireddy 2024-01-17 01:18:37 Re: reorganize "Shared Memory and LWLocks" section of docs