Closed antoniovazquezblanco closed 2 years ago
Aaaaand it breaks... :man_facepalming:
Sorry, while I fix it, send feedback about the idea..
Thanks!
Hey, thanks for the PR. There is indeed a coding style that in the early times (i.e. sigutils) was somewhat inconsistent. Nonetheless, I am skeptical about automatizing it with clang. Basically because there are certain purposefully ambiguous rules that end in "whichever is more readable".
Since this rules are a lot, and unfortunately I never spent time writing them down, I believe it is better off to unify the styles incrementally, as this list is formalized somewhere. The most straight-forward to apply are:
if () {
) except for function definitions (opening braces in a new line)From your feedback I believe that we might not be able to fully write down this into clang-format rules.
Given this you may prefer to avoid using a formatting tool at all. Maybe flexing them in order to automate formatting is ok with you.
Let me know whatever you prefer regarding this matter...
Tryed to create a clang-format config file that conforms to this rules... Hope this is a little better than before :)
This looks way better than before. If you manage to indent #ifdef / #if / #endif directives (with spaces between #
and the directives) I'll merge right away.
:)
Thanks!
Reading the code I found a couple of different code styles. I would like to unify them and provide a clang-format file to avoid future deviations.
If you provide any feedback I will try to follow whatever style request you make.
Thanks