Consider using include-cleaner in clang-tidy with cmake: https://clangd.llvm.org/design/include-cleaner
set_target_properties(${library_name} PROPERTIES CXX_CLANG_TIDY
"${CLANG_TIDY};--header-filter=.*<whatever you want to filter for>.*")
Note that you might need to include a .clangd file in your project.