Skip to content

Commit c7f1d95

Browse files
committed
Merge bitcoin/bitcoin#27205: doc: Show how less noisy clang-tidy output can be achieved
54c4d03 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 54c4d03 Tree-SHA512: c3dd8fb0600157582a38365a587e02e1d249fb246d6b8b4949a800fd05d3473dee49e2a4a556c60e51d6508feff810024e55fe09f5a0875f560fde30f3b6817c
2 parents 99b64ee + 54c4d03 commit c7f1d95

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/developer-notes.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,14 @@ apt install clang-tidy bear clang
217217
Then, pass clang as compiler to configure, and use bear to produce the `compile_commands.json`:
218218

219219
```sh
220-
./autogen.sh && ./configure CC=clang CXX=clang++
221-
make clean && bear make -j $(nproc) # For bear 2.x
222-
make clean && bear -- make -j $(nproc) # For bear 3.x
220+
./autogen.sh && ./configure CC=clang CXX=clang++ --enable-suppress-external-warnings
221+
make clean && bear --config src/.bear-tidy-config -- make -j $(nproc)
223222
```
224223

224+
The output is denoised of errors from external dependencies and includes with
225+
`--enable-suppress-external-warnings` and `--config src/.bear-tidy-config`. Both
226+
options may be omitted to view the full list of errors.
227+
225228
To run clang-tidy on all source files:
226229

227230
```sh

0 commit comments

Comments
 (0)