Hi,
A personal pet peeve of mine has been how pgindent formats struct
literals with named fields, for example the below:
static RBTNode sentinel =
{
.color = RBTBLACK,.left = RBTNIL,.right = RBTNIL,.parent = NULL
};
The attached patch fixes the formatting to be nicer:
static RBTNode sentinel =
{
.color = RBTBLACK, .left = RBTNIL, .right = RBTNIL, .parent = NULL
};
It is currently the only example but I mainly think that is because the
current formatting looks ugly so we avoid putting struct literals on a
single line. Plus I have seen this formatting in PostgreSQL extensions.
While fixing this personal annoyance I noticed that my fix also would
fix the formatting of varidic functions. For example:
-errdetail(const char *fmt,...)
+errdetail(const char *fmt, ...)
What do you think? I think both are clear improvements to the
readability and that the churn is not big enough to be an issue.
Andreas