Re: pgindent && weirdness
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>,
Piotr Stefaniak <postgres@piotr-stefaniak.me>
Date: 2020-01-14T22:30:21Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > I just ran pgindent over some patch, and noticed that this hunk ended up > in my working tree: > - if (IsA(leftop, Var) && IsA(rightop, Const)) > + if (IsA(leftop, Var) &&IsA(rightop, Const)) Yeah, it's been doing that for decades. I think the triggering factor is the typedef name (Var, here) preceding the &&. It'd be nice to fix properly, but I've tended to take the path of least resistance by breaking such lines to avoid the ugliness: if (IsA(leftop, Var) && IsA(rightop, Const)) regards, tom lane
Commits
-
Run pgindent with new pg_bsd_indent version 2.1.1.
- fa27dd40d5c5 13.0 landed
-
Final pgindent run with pg_bsd_indent version 2.1.
- e02ad575d8ab 13.0 landed