On Wed, Jan 10, 2024 at 01:25:36AM -0500, Tom Lane wrote:
> John Naylor <johncnaylo...@gmail.com> writes:
>> Off the top of my head, I like to use '//' comments as quick notes to
>> myself that stand out from normal code comments, and I'm in the habit
>> of putting debug print statements flush against the left margin so
>> they're really obvious. Both of these would be wiped out by pgindent.
> 
> +1.  I do both of those things, partly because pgindent would reformat
> them so that it'd be obvious if I forgot to remove them.  (Yes, I
> look at the diffs pgindent wants to make...)

I don't do the debug stuff on the left margin even if I force my way
with custom elogs when running regression tests as it is quicker than
using a coverage report.  I also take notes while reviewing or
implementing things with the '//' comments, so seeing these gone after
a check run would be sad.

> So that leads to the conclusion that I wouldn't want an automatic
> pgindent check to happen during "make all" or "make check", because
> I want those things to succeed before I consider pgindent'ing.
> Maybe it's okay to include it as part of check-world, but I'm
> not quite sure about that either.

Another possibility would be to hide the test behind a PG_TEST_EXTRA.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to