Merge bitcoin/bitcoin#34455: ci, iwyu: Fix warnings in src/univalue and treat them as errors

1bf3842223 ci, iwyu: Fix warnings in `src/univalue` and treat them as errors (Hennadii Stepanov)

Pull request description:

  This PR continues the ongoing effort to enforce IWYU warnings.

  See [Developer Notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#using-iwyu).

ACKs for top commit:
  maflcko:
    review ACK 1bf3842223 🦇
  sedited:
    ACK 1bf3842223

Tree-SHA512: e2b7ad7b318c6c78de9a6b416a2bcb6da3ec9f4f060590db2b4f5f3a9a167891ac60c68efccea889df806f53b803c98303eed1fc24682257a9c37844ee2ee55d
This commit is contained in:
merge-script
2026-01-31 15:05:44 +01:00
7 changed files with 3 additions and 10 deletions

View File

@@ -213,7 +213,7 @@ fi
if [[ "${RUN_IWYU}" == true ]]; then
# TODO: Consider enforcing IWYU across the entire codebase.
FILES_WITH_ENFORCED_IWYU="/src/((crypto|index|kernel|primitives|zmq)/.*\\.cpp|node/blockstorage.cpp|node/utxo_snapshot.cpp|core_io.cpp|signet.cpp)"
FILES_WITH_ENFORCED_IWYU="/src/((crypto|index|kernel|primitives|univalue/(lib|test)|zmq)/.*\\.cpp|node/blockstorage\\.cpp|node/utxo_snapshot\\.cpp|core_io\\.cpp|signet\\.cpp)"
jq --arg patterns "$FILES_WITH_ENFORCED_IWYU" 'map(select(.file | test($patterns)))' "${BASE_BUILD_DIR}/compile_commands.json" > "${BASE_BUILD_DIR}/compile_commands_iwyu_errors.json"
jq --arg patterns "$FILES_WITH_ENFORCED_IWYU" 'map(select(.file | test($patterns) | not))' "${BASE_BUILD_DIR}/compile_commands.json" > "${BASE_BUILD_DIR}/compile_commands_iwyu_warnings.json"

View File

@@ -7,7 +7,6 @@
#include <iomanip>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <utility>

View File

@@ -5,11 +5,7 @@
#include <univalue.h>
#include <cerrno>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <limits>
#include <locale>
#include <sstream>
#include <stdexcept>

View File

@@ -6,7 +6,6 @@
#include <univalue_utffilter.h>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <string>
#include <string_view>

View File

@@ -5,7 +5,6 @@
#include <univalue.h>
#include <univalue_escapes.h>
#include <memory>
#include <string>
#include <vector>

View File

@@ -8,7 +8,6 @@
#include <cassert>
#include <cstdint>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
#include <string_view>

View File

@@ -63,8 +63,9 @@
#include <array>
#include <cassert>
#include <cstdio>
#include <string>
#include <string_view>
#include <tuple>
static std::string rtrim(std::string s)
{