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

Re: [Xen-devel] Xen Coding style and clang-format



On Thu, Aug 1, 2019 at 4:06 AM Viktor Mitin <viktor.mitin.19@xxxxxxxxx> wrote:
>
> On Wed, Jul 31, 2019 at 8:05 PM Viktor Mitin <viktor.mitin.19@xxxxxxxxx> 
> wrote:
> >
> > On Wed, Jul 31, 2019 at 7:27 PM Lars Kurth <lars.kurth.xen@xxxxxxxxx> wrote:
> >
> > > Viktor: thank you for spending time on this
> > >
> > > I added an item to community call tomorrow and CC'ed you in the invite. 
> > > So I think what we need to do is figure out a way on how to make the 
> > > coding standard enforceable by a coding standard checker such as proposed 
> > > here. AFAICT
> > > * It seems there are some undocumented coding standard rules, which are 
> > > essentially causing problems with the tool
> > > * In addition, the fact that the LLVM coding style is the baseline for 
> > > the checks may also create some problems with false standard violations
> > >
> > > My instinct would be to try and document any undocumented rules on a 
> > > scratch space (e.g. google doc), look at differences between Xen and LLVM 
> > > formatting style and then make decisions using a voting mechanism to 
> > > avoid bike-shedding. In some cases discussion may be necessary though
> > >
> > > It would be good if you could attend, but I think we can do without you, 
> > > if needed
> > >
> >
> > Lars, thank you for the invitation. I will try to join the call.
> > Seems the topic is not a simple one, there are a lot of things to discuss 
> > it.
>
> Please be aware that the repo with xen clang-format has been created
> under the next link (branch xen-clang-format):
> https://github.com/xen-troops/llvm-project/tree/xen-clang-format
>
> The next script can be used as an example of how to build clang-format:
> https://github.com/viktor-mitin/xen-clang-format-example/blob/master/build_clang_format.sh

I had a chance to give it a shot right now and running it on the
hypervisor code results in 1073 out of 1165 files being changed by it.
Here is the gist of the diff:

https://gist.github.com/tklengyel/bc4a86e0f20b7c50c730c1b9429d4e2c

Cheers,
Tamas

_______________________________________________
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®.