Prior to the initial release we should format with clang_format, hopefully we can find arguments that do not change the current style.
Also needs an audit for statement bracing.
Prior to the initial release we should format with clang_format, hopefully we can find arguments that do not change the current style.
Also needs an audit for statement bracing.
We discussed this a while ago (on IRC? I can't remember), and everyone tended towards not doing it.
The main argument against it is that it will interrupt open PRs. Personally I think the style here is fine, and our culture is to point a lot of nits, so I don't think there are terrible violations of the style such as obviously wrong indentation etc.
A while ago I tried to come up with reasonable settings for clang-format but it was hard and I gave up after a while. It mostly complains about spacing (around operators, around *), and I think it's somewhat annoying to make this consistent as there is no clear preference. Also there are many locations in the code where we break common intentionally, e.g., long constants and multiple statements on a single line:
https://github.com/bitcoin-core/secp256k1/blob/master/src/scalar_4x64_impl.h#L75
I think none of this is a definitive thing. If someone objects, or manages to come up with nice settings that work and are not too invasive, I believe we could reconsider this. I'm closing this for now because I believe it's not really clear how to solve it.
Milestone
stable release (1.0.0-rc.1)