On 2016-01-29 at  9:45 'Davide Libenzi' via Akaros wrote:
> If clang format uses the compiler front end core libraries to parse
> and reformat (like it seems), than it is clearly better than a Perl
> script with regexes.
> But with checkpatch you can check your very own commit diff, while
> clang format would bark on the whole file(s).
> So to use that, you would need to apply clang format to the whole code
> base, to avoid your one liner patch to be barked upon, for unrelated
> format failures in the touched source files.

Verifying individual patches is the main use I have for checkpatch, so
whatever we come up with needs to support that.

Having a precommit hook is nice for individual developers, but I also
need to verify on my end that the patches are good.

Perhaps the clang-reformatter that you used could replace our
scripts/lindent.sh.  That one was intended to attempt to fix an entire
file, but it tended to get a bunch of things wrong.  If the
clang-formatter that you used will do the trick for the big file, we
can use that in the common sequence of code importing:
        1. import
        2. spatch
        3. lindent -> clang

Also, in general, does your final patch after that clang reformat pass
most of checkpatch's tests?  If not, that sounds like something is
wrong.

Barret

> > BasedOnStyle: LLVM
> > IndentWidth: 8

p.s. 8 -> 4.

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to