Update style guide #10461

pull sipa wants to merge 1 commits into bitcoin:master from sipa:stylish changing 1 files +34 −11
  1. sipa commented at 10:53 pm on May 26, 2017: member
    As discussed in this week’s IRC meeting.
  2. Update style guide 47d8441466
  3. sipa force-pushed on May 26, 2017
  4. fanquake added the label Docs and Output on May 26, 2017
  5. dcousens approved
  6. paveljanik approved
  7. practicalswift commented at 3:01 pm on May 29, 2017: contributor

    ACK 47d8441

    Very good! Thanks for clarifying!

  8. in doc/developer-notes.md:36 in 47d8441466
    39+    separate words.
    40+    - Class member variables have a `m_` prefix.
    41+    - Global variables have a `g_` prefix.
    42+  - Constant names are all uppercase, and use `_` to separate words.
    43+  - Class names, function names and method names are CamelCase. Do not prefix
    44+    class names with `C`.
    


    luke-jr commented at 6:23 pm on May 29, 2017:
    Why not prefix class names with C?
  9. sipa commented at 6:29 pm on May 29, 2017: member
    It is always obvious from the usage that a name refers to a class and not a function/method, so no need to repeat that information in the name.
  10. luke-jr commented at 6:39 pm on May 29, 2017: member
    Is it? function(0, class()) seems fairly non-obvious.
  11. gmaxwell commented at 8:13 am on May 30, 2017: contributor
    Seems fine to me.
  12. in doc/developer-notes.md:35 in 47d8441466
    38+  - Variable and namespace names are all lowercase, and may use `_` to
    39+    separate words.
    40+    - Class member variables have a `m_` prefix.
    41+    - Global variables have a `g_` prefix.
    42+  - Constant names are all uppercase, and use `_` to separate words.
    43+  - Class names, function names and method names are CamelCase. Do not prefix
    


    jonasschnelli commented at 8:41 am on May 30, 2017:
    Not sure if we had a discussion about that already: I often saw projects where the static class methods and global space functions where in UpperCamelCase() while the class methods where in lowerCamelCase() and I think this is useful. But no strong opinion.

    laanwj commented at 2:56 pm on May 31, 2017:
    Except for the qt code, this just documents the style already in use. So while this sounds sensible for a new project, I don’t think we should change this now.
  13. jonasschnelli commented at 8:41 am on May 30, 2017: contributor
    ACK 47d84414662c09bc08cfc96f78457ddd602a20ac
  14. in doc/developer-notes.md:10 in 47d8441466
     9-to clean up the patch automatically before submitting a pull request.
    10+a single style, which is specified below. When writing patches, favor the new
    11+style over attempting to mimick the surrounding style, except for move-only
    12+commits.
    13+
    14+Do not submit patches solely to modify the style of existing code.
    


    laanwj commented at 2:58 pm on May 31, 2017:
    Thanks for adding this explicitly :+1:
  15. laanwj commented at 2:59 pm on May 31, 2017: member
    utACK 47d8441
  16. laanwj merged this on May 31, 2017
  17. laanwj closed this on May 31, 2017

  18. laanwj referenced this in commit 55b72f3880 on May 31, 2017
  19. jtimon commented at 11:31 pm on June 1, 2017: contributor
    ACK
  20. sipa deleted the branch on Jun 23, 2017
  21. PastaPastaPasta referenced this in commit e8d0f826c9 on Aug 17, 2019
  22. PastaPastaPasta referenced this in commit 363fae27f0 on Sep 19, 2019
  23. PastaPastaPasta referenced this in commit f8b494b8b7 on Sep 23, 2019
  24. PastaPastaPasta referenced this in commit b32b6edd50 on Sep 24, 2019
  25. PastaPastaPasta referenced this in commit ce50791755 on Nov 19, 2019
  26. PastaPastaPasta referenced this in commit f943d95525 on Dec 9, 2019
  27. PastaPastaPasta referenced this in commit 44fd3b8edf on Jan 1, 2020
  28. PastaPastaPasta referenced this in commit 191a6d9431 on Jan 2, 2020
  29. ckti referenced this in commit 07de8841b5 on Mar 28, 2021
  30. gades referenced this in commit 1f4600e1dc on Jun 30, 2021
  31. DrahtBot locked this on Sep 8, 2021

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: 2024-07-03 10:13 UTC

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