Introduce clang-format + make the CI enforce clang-format clean C/C++ code - #260
Introduce clang-format + make the CI enforce clang-format clean C/C++ code#260hartwork wants to merge 4 commits into
Conversation
This is with clang-format 15.0.7.
ba9fa7e to
116298a
Compare
@kaixiong why only fix it in half the code?
We can do that. If you can make a list of "bugs" in the effect, I can see if I can find the knows to turn for it.
Re-styling was never the key missing, it is a side-effect of the current inconsistency and in that sense a necessity, just the degree of it depends on the config. |
|
@hartwork Plugins that are imported code (actors mostly) come with their own formatting. Some are internally consistent, some are not. What's more, we mostly modify them just to fix bugs so I do not find the need for formatting fixes strong enough to mess up the blame history. Large patches like the one for DancingParticles are not common. I'm okay with applying Core's formatting to the others (input and morph). |

@kaixiong the idea is this:
.clang-formatwith the default formatting and then track changes to that file over time in Git..clang-formatstyle choices until ideally the pain of everyone is low enough is part of what the pull request.clang-format <clang-format@tools.invalid>so it stands out in e.g. Git blame.Looking forward to your feedback.