[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC] xen: Add .astylerc for automated style-formatting



Hi Viktor,

On 26/07/2019 15:58, Viktor Mitin wrote:
On Fri, Jul 19, 2019 at 11:37 AM Julien Grall <julien.grall@xxxxxxx> wrote:

Hi Tamas,

On 18/07/2019 18:22, Tamas K Lengyel wrote:
     - Line 139: The { are commonly on the same line as struct or definition.

According to CODING_STYLE that's not how it should be.

I guess you refer to the section "Bracing". If so, I think we don't follow the
CODING_STYLE for struct or definition.

I have to admit that for this case, I always have to look at other usage in the
code because I tend to put the { on a newline.

I was going to say that there may be some cases where it makes sense to keep {
on the same line. For instance:

     { a, b, c, d },
     { e, f, g, h },


All the rules should be stated in CODING_STYLE explicitly.
In other cases, it cannot be automated with future proves why it works
this or that way.

This is not very constructive to send on multiple different threads "this should be explicitly be in the CODING_STYLE". Most of the people in CC are aware this is an issue.

But the problem here is codifying those styles. This often results in a lot of discussions because a lot is a matter of taste. In other there are no answers to the patches.

What we need is someone to drive this effort and make sure we make some 
progress.

Also, trying to codify all the unwritten styles is probably going to be difficult. Instead, I would suggest to start from an existing coding style that is very close to Xen (maybe BSD?).

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.