Uncrustify automatic unified coding style #4847

issue kostaz opened this issue on September 5, 2014
  1. kostaz commented at 6:53 AM on September 5, 2014: contributor

    I'd like to make a group of patches that change the coding style of C++ files in an automatics way using uncrustify tool. And, even more important, make future coding style changes automatic.

    As tested in my local environment, this makes the code way more clear and easier to read and understand. Also I hope that the clean and highly readable code may bring more people to the work on the bitcoin core!

    Generally, there are two ways to achieve this - (1) one huge patch or (2) many incremental patches (10 to 20 patches).

    What would you suggest? Please comment!

  2. laanwj commented at 9:48 AM on September 5, 2014: member

    @sipa has been working on this for a while already with clang's formatting tool See for example #4498

  3. kostaz commented at 11:32 AM on September 11, 2014: contributor

    I did see. But the pull request of mine is there to discuss some changes in the coding style.

    To reiterate:


    The purpose of this patch is to propose and discuss the coding style for the Bitcoin Core source code.

    The main idea of this approach is:
     - Love spaces
     - Love newlines '\n'
     - Love empty lines to delimit the code parts
     - Put curly braces **everywhere** and always on the new line
    
    I believe that this approach produce the code that is especially
    easy to read and understand for the non-pro person diving into
    the world of Bitcoin.
    

  4. kostaz commented at 11:32 AM on September 11, 2014: contributor

    Did you possibly mean to close this issue and continue the discussion on the pull request "blog"?

  5. laanwj commented at 11:36 AM on September 11, 2014: member

    Well my point is that it would be useful if you at least start your discussion from what is already done by him (and read prior discussions which led to the current .clang-format to be merged), to avoid repeated discussions. If you start with yet another tool, it's hard to compare.

  6. laanwj commented at 7:40 AM on September 25, 2014: member

    Closing this, discussion is in #4498

  7. laanwj closed this on Sep 25, 2014

  8. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

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

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