From 52b0200ceabb3260c08902a480461aa83be294c6 Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Sun, 1 Nov 2026 23:52:02 +0800 Subject: [PATCH] ci: enforce standard-library includes with misc-include-cleaner Re-enable clang-tidy's misc-include-cleaner, scoped to standard-library headers only. Project headers under iceberg/ and all third-party headers are listed in IgnoreHeaders, so the check no longer demands a direct include for every symbol an already-included project header provides, which is the noise that led to its removal in #708. What remains is the class of regression seen in #1066: a source file drops or while still using std::vector or std::unique_ptr, and compiles only because a project header happens to pull the standard header in transitively. Co-Authored-By: Claude Fable 5.1 --- .clang-tidy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index e7e8abd33d..b07aac58f0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -21,6 +21,7 @@ Checks: | clang-analyzer-*, google-*, modernize-*, + misc-include-cleaner, readability-identifier-naming, readability-isolate-declaration, -modernize-use-nodiscard, @@ -41,5 +42,11 @@ CheckOptions: value: '_' - key: modernize-use-scoped-lock.WarnOnSingleLocks value: 'false' + # misc-include-cleaner is scoped to standard-library headers only. Project + # headers (iceberg/) and third-party headers are ignored so the check does + # not demand a direct include for every symbol that an already-included + # project header provides (the noise that led to its removal in #708). + - key: misc-include-cleaner.IgnoreHeaders + value: 'iceberg/.*;arrow/.*;avro/.*;aws/.*;benchmark/.*;cpr/.*;curl/.*;gmock/.*;gtest/.*;nanoarrow/.*;nlohmann/.*;openssl/.*;parquet/.*;roaring/.*;spdlog/.*;sqlpp23/.*;thrift/.*;libpq-fe\.h;mysql\.h;sqlite3\.h;utf8proc\.h;zlib\.h' HeaderFilterRegex: 'src/iceberg|example'