doc: document clang tidy named args #24665

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:document_clang_tidy changing 2 files +54 −8
  1. fanquake commented at 8:25 AM on March 25, 2022: member

    The documentation, and a single commit extracted from #24661.

    Motivation:

    Incorrect named args are source of bugs, like #22979.

    To allow them being checked by clang-tidy, use a format it can understand.

  2. doc: Document clang-tidy in dev notes 67f654ef61
  3. addrman: fix incorrect named args 7e22d80af3
  4. MarcoFalke approved
  5. MarcoFalke commented at 8:33 AM on March 25, 2022: member

    lgtm

  6. in src/addrman.cpp:958 in 7e22d80af3
     961 | -                               /*bucket=*/bucket,
     962 | -                               /*position=*/addr_info->GetBucketPosition(nKey, true, bucket));
     963 | +        return AddressPosition(/*tried_in=*/false,
     964 | +                               /*multiplicity_in=*/addr_info->nRefCount,
     965 | +                               /*bucket_in=*/bucket,
     966 | +                               /*position_in=*/addr_info->GetBucketPosition(nKey, true, bucket));
    


    MarcoFalke commented at 8:36 AM on March 25, 2022:

    unrelated comment:

    If msvc was less crappy, we could use designated initializers to enforce named args in constructors without clang-tidy, see #24531

  7. DrahtBot added the label P2P on Mar 25, 2022
  8. glozow removed the label P2P on Mar 25, 2022
  9. glozow added the label Docs on Mar 25, 2022
  10. glozow commented at 2:14 PM on March 25, 2022: member

    Concept ACK, would be nice to be able to point to developer notes when someone asks why I'm formatting arg names this way. The instructions look correct. Were you planning on fixing all of the clang-tidy violations or just these in addrman.cpp?

  11. fanquake commented at 2:50 PM on March 25, 2022: member

    Were you planning on fixing all of the clang-tidy violations or just these in addrman.cpp?

    and a single commit extracted from #24661.

    The rest of the changes are in #24661. That will likely need rebasing a number of times, so I just want to get the docs, and a demonstration commit in for now.

  12. glozow commented at 2:58 PM on March 25, 2022: member

    The rest of the changes are in #24661. That will likely need rebasing a number of times, so I just want to get the docs, and a demonstration commit in for now.

    Ok gotchu makes sense

  13. glozow commented at 3:01 PM on March 25, 2022: member

    ACK 7e22d80af333b202939bcb2631082006c097bf22

  14. fanquake merged this on Mar 25, 2022
  15. fanquake closed this on Mar 25, 2022

  16. sidhujag referenced this in commit 24a5e0f92b on Apr 2, 2022
  17. fanquake deleted the branch on Apr 20, 2022
  18. DrahtBot locked this on Apr 20, 2023

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-18 09:14 UTC

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