doc: relax clang-format loop and template declaration rules #36912

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2611-clang-format-for-loops-one-line changing 1 files +2 −2
  1. maflcko commented at 8:44 AM on November 19, 2026: member

    I think it is clear that devs are not following the clang-format config here even in new code, and I don't want to rub this in during review, nor do I want to see clang-format edit those when I use it locally.

    So relax the config to allow those.

    References:

    https://clang.llvm.org/docs/ClangFormatStyleOptions.html#allowshortloopsonasingleline:

    git grep --line-number --perl-regexp '^\s*for \([^)]+\) [^{]+;$' ./src/ | wc -l
    -> 111
    

    https://clang.llvm.org/docs/ClangFormatStyleOptions.html#alwaysbreaktemplatedeclarations:

    git grep --line-number --perl-regexp '^\s*template\s*<.*>\s*(?:class|struct|[A-Za-z_])' | wc -l
    -> 162
    
  2. doc: clang-format: AllowShortLoopsOnASingleLine: true fa90a74455
  3. doc: clang-format: AlwaysBreakTemplateDeclarations: No fa07938a6f
  4. DrahtBot added the label Docs on Nov 19, 2026
  5. DrahtBot commented at 8:44 AM on November 19, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK l0rinc

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  6. l0rinc commented at 10:51 AM on November 19, 2026: contributor

    ACK fa07938a6f5c904aecf5d7925dbaf374a9db4897

    I checked for similar mismatches locally, these two were the clearest cases for relaxing the config.

Labels

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-11-19 19:51 UTC

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