Re: pgindent exit status if a file encounters an error - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: pgindent exit status if a file encounters an error
Date
Msg-id CAExHW5sPjCaZzfx0Vf887qO2GxsLWEn3nBvbBSM_vgxcQnpzyA@mail.gmail.com
Whole thread Raw
In response to Re: pgindent exit status if a file encounters an error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On Wed, Jun 26, 2024 at 8:54 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> The usage help mentions exit code 2 specifically while describing --check
> option but it doesn't mention exit code 1. Neither does the README. So I
> don't think we need to document exit code 3 anywhere. Please let me know if
> you think otherwise.

I think we should have at least a code comment summarizing the
possible exit codes, along the lines of

# Exit codes:
#   0 -- all OK
#   1 -- could not invoke pgindent, nothing done
#   2 -- --check mode and at least one file requires changes
#   3 -- pgindent failed on at least one file

Thanks. Here's a patch with these lines.
 
In an offline chat Andrew mentioned that he expects more changes in the patch and he would take care of those. Will review and test his patch.

--
Best Wishes,
Ashutosh Bapat
Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Test to dump and restore objects left behind by regression
Next
From: Tatsuo Ishii
Date:
Subject: Re: Converting README documentation to Markdown