diff options
author | fanquake <fanquake@gmail.com> | 2023-03-10 17:38:48 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-03-10 17:38:56 +0100 |
commit | c7f1d95f52883d7087b74f45f5e4ce1100d51149 (patch) | |
tree | 71c8d2b9548db9657a6609c05039eb8684b7431b | |
parent | 99b64eec1bcc5fc3d6d441ff606a39018894d625 (diff) | |
parent | 54c4d03578c5842f19bf8bc68aca5faf8beed5c3 (diff) |
Merge bitcoin/bitcoin#27205: doc: Show how less noisy clang-tidy output can be achieved
54c4d03578c5842f19bf8bc68aca5faf8beed5c3 doc: Show how less noisy clang-tidy output can be achieved (TheCharlatan)
Pull request description:
Adds a paragraph to the clang-tidy section explaining how to de-noise its output. By default clang-tidy will print errors arrising from included headers in leveldb and other dependencies. By passing `--enable-suppress-external-warnings` flag to configure, errors arising from external dependencies are suppressed. Additional errors arrising from internal dependencies such as leveldb are suppressed by passing the `src/.bear-tidy-config` configuration file to bear. This file includes exclusionary rules for leveldb.
ACKs for top commit:
MarcoFalke:
utACK 54c4d03578c5842f19bf8bc68aca5faf8beed5c3
Tree-SHA512: c3dd8fb0600157582a38365a587e02e1d249fb246d6b8b4949a800fd05d3473dee49e2a4a556c60e51d6508feff810024e55fe09f5a0875f560fde30f3b6817c
-rw-r--r-- | doc/developer-notes.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md index f15df1bf73..40e5eb785f 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -217,11 +217,14 @@ apt install clang-tidy bear clang Then, pass clang as compiler to configure, and use bear to produce the `compile_commands.json`: ```sh -./autogen.sh && ./configure CC=clang CXX=clang++ -make clean && bear make -j $(nproc) # For bear 2.x -make clean && bear -- make -j $(nproc) # For bear 3.x +./autogen.sh && ./configure CC=clang CXX=clang++ --enable-suppress-external-warnings +make clean && bear --config src/.bear-tidy-config -- make -j $(nproc) ``` +The output is denoised of errors from external dependencies and includes with +`--enable-suppress-external-warnings` and `--config src/.bear-tidy-config`. Both +options may be omitted to view the full list of errors. + To run clang-tidy on all source files: ```sh |