[devtools] add clang-format.py#6790
Conversation
|
Not sure if possible: a script that only clang-formats changed/added code (would require some clever git operations) would be nice. |
|
@jonasschnelli Not sure if clang-format-diff.py is what you are looking for. |
|
After looking at the amount of changes And as written above, I do not think the wrapper (in fact, |
I think we all agree on this.
How would one verify a format PR when different versions produce different output? Also, it may be useful the extend the |
|
Code review ACK, although I'm not sure I see when this should be used. Needs mention in |
|
Earlier reasons to not use clang-format was that its output changed, even
between several "versions" of clang-format-3.5. I wonder whether a solution
could be to include a small snippet of representative unformatted code, and
have the wrapper script check whether it results in the expected output?
|
|
It should definitely be used when committing new files... |
c2cbfec to
8df2a9c
Compare
65a293f to
37772d1
Compare
37772d1 to
8c15f33
Compare
I like this idea a lot. |
This will add a python convenience wrapper for
clang-format. The python code includes a list with tested versions (tested_versions) which can easily be updated in the future.[ci skip]