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

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



On Fri, Jul 26, 2019 at 4:52 PM Lars Kurth <lars.kurth.xen@xxxxxxxxx> wrote:
> >> thank you for putting this mail together and driving this forward. I added 
> >> committers@ as well as Doug. I am going to let others respond first.
> >> I am assuming we are looking for some testing?
> >
> > Yes, you are right.
> > The implementation has been updated and retested with newer versions
> > of clang code.
> > We are looking for some testing and feedback to move forward.
> >
> >> Is there a simple set of instructions to get started and test the tool?
> >
> > Yes, however, since the changes are not integrated into clang-format
> > mainline yet,
> > to test the tool it needs to compile clang-format tool with the patch first.
>
> OK
> Is there a git repo which includes the patch? That would make things a little 
> easier

There is no llvm repo with the patch since we checked various releases
of clang with it....
However, it is a good idea to prepare such a repo to simplify the
build of the tool.
We will prepare the repo for it.

>
> > There are two use-cases with it:
> > - clang-format binary can be used as-is to check given file or many files.
> > For example, the next command formats all xen *.c files with it.
> > find ~/w/xen/xen -name '*.c' -print0 | xargs -0 -n 1 -P 12
> > ~/w/llvm-project/bin/clang-format -i -style=xen
> >
> > See output example in:
> > https://raw.githubusercontent.com/viktor-mitin/xen-clang-format-example/master/0001-clang-format-checkpatch-output-example.patch
> >
> > - another use-case is to run it with clang-format diff checker,
> > For example, the next command line checks the latest commit in case of git:
> > git diff -U0 --no-color HEAD^ | clang-format-diff -p1
>
> Does this require to copy the modified clang-format-diff.py (which is 
> mentioned in the mail) somewhere

Not really, mean it does not require to copy the modified
clang-format-diff.py. The only feature modified clang-format-diff.py
provides is covering code file to code style mappings.
This is a minor feature, and it is not relevant for the Xen code style
patches testing. It has been decided not to modify python tool for
now...
So it is possible to use not modified version of clang-format-diff
tool for the patches checks.

Thanks

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