clang format #306

issue gmaxwell opened this issue on September 17, 2015
  1. gmaxwell commented at 8:52 PM on September 17, 2015: contributor

    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.

  2. gmaxwell added this to the milestone initial release on Sep 17, 2015
  3. real-or-random commented at 7:10 PM on December 2, 2020: contributor

    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.

  4. real-or-random closed this on Dec 2, 2020

Milestone
stable release (1.0.0-rc.1)


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me