Skip to content

Add automated include-what-you-use checks#8021

Draft
achamayou with Copilot wants to merge 8 commits into
mainfrom
copilot/automate-includes-checks
Draft

Add automated include-what-you-use checks#8021
achamayou with Copilot wants to merge 8 commits into
mainfrom
copilot/automate-includes-checks

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

CCF has recurring missing-include issues, especially in public headers. This adds automated IWYU enforcement without applying a disruptive repository-wide include rewrite.

  • IWYU CMake integration

    • Added INCLUDE_WHAT_YOU_USE support via cmake/iwyu.cmake.
    • Fails builds on IWYU suggestions.
    • Uses libcxx.imp when available to avoid libc++ internal-header suggestions.
  • CI/check script wiring

    • Added scripts/iwyu-checks.sh.
    • Wired it into scripts/ci-checks.sh.
    • Added include-what-you-use to CI/dev dependency setup.

Example usage:

cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCOMPILE_TARGET=virtual -DINCLUDE_WHAT_YOU_USE=ON ..
ninja

Copilot AI linked an issue Jul 3, 2026 that may be closed by this pull request
Copilot AI and others added 7 commits July 3, 2026 14:45
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI changed the title [WIP] Add automated enforcement of includes Add automated include-what-you-use checks Jul 3, 2026
Copilot AI requested a review from achamayou July 3, 2026 14:52
@achamayou

Copy link
Copy Markdown
Member

@copilot code format!

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot code format!

Ran the CMake formatter and shellcheck; they passed and produced no formatting changes. Current head remains 5bb0873.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use automated enforcement of includes

2 participants