Re: Add --check option to pgindent

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Euler Taveira" <euler(at)eulerto(dot)com>, "Michael Banck" <mbanck(at)gmx(dot)net>, "Daniel Gustafsson" <daniel(at)yesql(dot)se>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add --check option to pgindent
Date: 2023-12-15 15:43:32
Message-ID: CXP0TUOU4C1N.Z7Q508WQ4XJP@neon.tech
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri Dec 15, 2023 at 8:18 AM CST, Jelte Fennema-Nio wrote:
> This part of the first patch seems incorrect, i.e. same condition in
> the if as elsif
>
> - if ($silent_diff)
> + if ($check)
> + {
> + print show_diff($source, $source_filename);
> + exit 2;
> + }
> + elsif ($check)
> {
> exit 2;
> }

Weird how I was able to screw that up so bad :). Thanks! Here is a v3.
--
Tristan Partin
Neon (https://neon.tech)

Attachment Content-Type Size
v3-0001-Rename-silent-diff-to-check-in-pgindent.patch text/x-patch 2.0 KB
v3-0002-Rename-show-diff-to-diff-in-pgindent.patch text/x-patch 2.2 KB
v3-0003-Allow-check-and-diff-to-passed-in-the-same-pginde.patch text/x-patch 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-12-15 16:06:12 Re: Clean up find_typedefs and add support for Mac
Previous Message Josef Šimánek 2023-12-15 15:38:16 Re: [PATCH] Add --syntax to postgres for SQL syntax checking