doc: clarify clang-tidy in developer notes #35149

pull rkrux wants to merge 1 commits into bitcoin:master from rkrux:clang-tidy changing 1 files +9 −2
  1. rkrux commented at 12:02 PM on April 24, 2026: contributor

    Recently, I ran clang-tidy in my system and had to figure out setting it up correcty on my system (macOS) & understanding its output while tweaking few arguments that made the output easier to parse.

    This patch documents those in the developer notes.

  2. DrahtBot added the label Docs on Apr 24, 2026
  3. DrahtBot commented at 12:02 PM on April 24, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK sedited

    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-->

  4. in doc/developer-notes.md:178 in 5a4a0498f9
     176 | -To run clang-tidy on all source files:
     177 | +To run clang-tidy on all source files using the checks mentioned in the `./src/.clang-tidy` file:
     178 |  
     179 |  ```sh
     180 | -( cd ./src/ && run-clang-tidy -p ../build -j $(nproc) )
     181 | +( cd ./src/ && run-clang-tidy -p ../build -j $(nproc) && cd .. )
    


    maflcko commented at 12:27 PM on April 24, 2026:

    The second cd seems redundant?


    rkrux commented at 1:03 PM on April 24, 2026:

    I want it to go back to the root directory automatically after clang-tidy is done.


    maflcko commented at 1:11 PM on April 24, 2026:

    Yes, this is what happens when the inner Bash exits:

    $ echo $PWD && ( cd folder && echo $PWD ) && echo $PWD
    /tmp
    /tmp/folder
    /tmp
    

    There is no need for a manual cd


    rkrux commented at 1:18 PM on April 24, 2026:

    Ah, I forgot adding the parentheses - I'll remove the cd.

  5. in doc/developer-notes.md:181 in 5a4a0498f9
     179 |  ```sh
     180 | -( cd ./src/ && run-clang-tidy -p ../build -j $(nproc) )
     181 | +( cd ./src/ && run-clang-tidy -p ../build -j $(nproc) && cd .. )
     182 |  ```
     183 |  
     184 | +Optionally, append the `run-clang-tidy` command with the `-quiet` option to suppress printing of statistics and ignored warnings that can clutter the output.
    


    maflcko commented at 12:28 PM on April 24, 2026:

    There is also the -fix option, which sometimes comes in handy


    rkrux commented at 1:35 PM on April 24, 2026:

    Added a sentence.

  6. in doc/developer-notes.md:184 in 5a4a0498f9 outdated
     182 |  ```
     183 |  
     184 | +Optionally, append the `run-clang-tidy` command with the `-quiet` option to suppress printing of statistics and ignored warnings that can clutter the output.
     185 | +
     186 |  To run clang-tidy on the changed source lines:
     187 |  
    


    maflcko commented at 12:29 PM on April 24, 2026:

    fwiw, to run it on a single file: clang-tidy -p=./build/ src/single_file.cpp


    rkrux commented at 1:35 PM on April 24, 2026:

    Added a block for this as I used it frequently earlier.

  7. maflcko approved
  8. maflcko commented at 12:29 PM on April 24, 2026: member

    lgtm, but the cd seems odd?

  9. doc: clarify clang-tidy in developer notes
    Recently, I ran clang-tidy in my system and had to figure out setting it up
    correcty on my system (macOS) & understanding its output while tweaking
    few arguments that made the output easier to parse.
    
    This patch documents those in the developer notes.
    a1e534bbf0
  10. rkrux force-pushed on Apr 24, 2026
  11. sedited approved
  12. sedited commented at 1:41 PM on April 27, 2026: contributor

    ACK a1e534bbf076389321a7b0972451671b83b758e8

  13. sedited merged this on Apr 27, 2026
  14. sedited closed this on Apr 27, 2026

  15. l0rinc commented at 2:36 PM on April 27, 2026: contributor

    post-merge code review ACK a1e534bbf076389321a7b0972451671b83b758e8


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-05-13 00:13 UTC

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