On Mon, 23 Feb 2026 12:23:08 -0500
Peter Foley
On Mon, Feb 23, 2026 at 11:45 AM Peter Foley
wrote: The primary BUILD file is in Google's internal repository, so I can't share that. An OSS bazel version looks like https://github.com/pefoley2/passt/commit/4f89da6f05c84c9f171689541fd81549b48... Unfortunately in my quick testing, the OSS bazel build doesn't actually catch the same layering check violations that Google's internal "Blaze" variant of bazel does. So I'm not sure how helpful it would be.
I poked at this some more, and clang-include-cleaner seems to be able to do a good job of determining whether the headers compile stand-alone. I had to make some more fixes to get there though: https://github.com/pefoley2/passt/commit/5067d86e567851db24dad515cd36b536272...
By the way, we already run clang-tidy tests ('make clang-tidy') as part of our tests (test/build/static_checkers.sh). Would it be just a matter of enabling the misc-include-cleaner in the list of tests we give clang-tidy from the Makefile: https://clang.llvm.org/extra/clang-tidy/checks/misc/include-cleaner.html ? I haven't tried.
If you want, I can fold the two "include fixing" commits together and re-send.
Yes, thanks, that would be appreciated. I would first try to settle on a convenient way to keep Blaze/Bazel happy for the future, though. -- Stefano