Re: pgindent exit status if a file encounters an error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgindent exit status if a file encounters an error
Date: 2024-06-26 15:24:38
Message-ID: 1510956.1719415478@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)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

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-06-26 15:47:09 Re: [PATCH] Add ACL (Access Control List) acronym
Previous Message Andrei Lepikhov 2024-06-26 15:00:27 Incremental Sort Cost Estimation Instability