migrate from astyle to clang-format, add tests/#8455
migrate from astyle to clang-format, add tests/#8455AllmanStyler wants to merge 15 commits intoesp8266:masterfrom
astyle to clang-format, add tests/#8455Conversation
|
a lot of changes :> |
| typedef enum | ||
| { |
| do | ||
| { | ||
| } while (do_menu()); |
| auto t = [](const char* h, const char* n) | ||
| { |
There was a problem hiding this comment.
...and this, which is correct from the ruleset standpoint, but looks really weird :/
There was a problem hiding this comment.
Yes it is sometimes weird.
If we had another tool than astyle we'd have less oddities.
There was a problem hiding this comment.
Macros also seem to break b/c of the braces detachment
I'd expect clang-format to work pretty well, with a more verbose ruleset though compared to the astyle
There was a problem hiding this comment.
Also see https://sourceforge.net/p/astyle/bugs/548/
Plus, for examples (where astyle conf Arduino IDE formatter link is 404 btw) IDE 2.0+ is expected migrate to clang tool as well arduino/Arduino#11543
There was a problem hiding this comment.
Is this better ?
I'll try to find the arduino-example configuration when I get more time (edit: done, see OP)
(edit: any change to the configuration file is welcome and can be tested in this PR)
astyle to clang-format, add tests/
|
Closing in favor of #8464 |
edit3
tests/is added totests/restyle.shand appliedclang-formatis used instead of astyle,its configuration is stored into
restyle.sh