Refine .clang-format#1113
Conversation
The GitHub UI is unusable here. All I can get from these links is some random location in the diff that is jumping multiple times into other random locations. I can't see what you are referencing.
No. It wants to touch too much in places where I have specifically chosen to go with the styling choice I went.
I don't want tool-specific markup in the code, especially markup that is only required because the tool is bad at what it does.
The only reason I have considered including
I don't think adapting yourself to the shape of a bad tool is a good choice, ever. |
|
Thanks for the answer! (I think this will serve as reference for anybody thinking of this in the future) As for the changes in this PR, I also pushed a commit that shows the differences between the old .clang-format and the one in this PR here: siliceum@facd86b. |
I tried to refine a bit the
.clang-formatfile that was introduced in #835 .There were and still are a few issues:
This is still broken, the tool has bugs
Fixed
Still not possible.
I also fixed a few other things such as lambdas, spaces with templates, ...
I uploaded a branch with the files fully formatted with this new file here: 6ef5558
Things that I noticed and still aren't really good:
forloops)#if#if6ef5558#diff-0050b814bc7135be0784c57ca198df3787ff137d2bbcdc929048032fdd426464L1tracy/public/tracy/TracyOpenGL.hpp
Lines 52 to 77 in 6ef5558
Overall, while the output diff is big, there seem to be a lot of valid formatting fixes.
Would it be possible to consider applying (progressively) clang-format on whole files from the
profilerandpublic/commonfolders?Note that it is possible to disable formatting locally using
// clang-format off/// clang-format onThe reason I ask this is that (imho), even though the formatting doesn't always look great, it would be very helpful to be able to format the whole document as some editors do not support partial formatting (as mentioned in #958). Worse VS20XX does pick and apply
.clang-formatby default on the whole file. (It can be disabled but then you lose the ability to format using theclang-format).This would make the onboarding easier (and perhaps a bit less formatting errors in PRs, of which I'm very much guilty, sorry.)
Thoughts ? (We can shift this discussion to an issue if you prefer, as it is a bit orthogonal to the changes applied to the config file here)