bitcoin/contrib/devtools/bitcoin-tidy
fanquake 7bf078f2b7
Merge bitcoin/bitcoin#28237: refactor: Enforce C-str fmt strings in WalletLogPrintf()
fa60fa3b0c bitcoin-tidy: Apply bitcoin-unterminated-logprintf to spkm as well (MarcoFalke)
faa11434fe refactor: Enable all clang-tidy plugin bitcoin tests (MarcoFalke)
fa6dc57760 refactor: Enforce C-str fmt strings in WalletLogPrintf() (MarcoFalke)
fa244f3321 doc: Fix bitcoin-unterminated-logprintf tidy comments (MarcoFalke)

Pull request description:

  All fmt functions only accept a raw C-string as argument.

  There should never be a need to pass a format string that is not a compile-time string literal, so disallow it in `WalletLogPrintf()` to avoid accidentally introducing it.

  Apart from consistency, this also fixes the clang-tidy plugin bug https://github.com/bitcoin/bitcoin/pull/26296#discussion_r1286821141.

ACKs for top commit:
  theuni:
    ACK fa60fa3b0c

Tree-SHA512: fa6f4984c50f9b34e850bdfee7236706af586e512d866cc869cf0cdfaf9aa707029c210ca72d91f85e75fcbd8efe0d77084701de8c3d2004abfd7e46b6fa9072
2023-08-18 11:38:38 +01:00
..
bitcoin-tidy.cpp tidy: Integrate bicoin-tidy clang-tidy plugin 2023-08-03 17:52:24 +01:00
CMakeLists.txt bitcoin-tidy: fix macOS build 2023-08-10 21:14:50 +00:00
example_logprintf.cpp bitcoin-tidy: Apply bitcoin-unterminated-logprintf to spkm as well 2023-08-16 14:56:37 +02:00
logprintf.cpp bitcoin-tidy: Apply bitcoin-unterminated-logprintf to spkm as well 2023-08-16 14:56:37 +02:00
logprintf.h doc: Fix bitcoin-unterminated-logprintf tidy comments 2023-08-08 09:11:05 +02:00
README doc: use llvm-config for bitcoin-tidy example 2023-08-10 12:39:35 +02:00

# Bitcoin Tidy

Example Usage:

```bash
cmake -S . -B build -DLLVM_DIR=$(llvm-config --cmakedir) -DCMAKE_BUILD_TYPE=Release

cmake --build build -j$(nproc)

cmake --build build --target bitcoin-tidy-tests -j$(nproc)
```