[style] apply IWYU to public headers (#11580)

It would be easier to use OpenThread public headers if they are
self-contained and follows the IWYU style guide. This commit fixes some
style issues to make the public headers self-contained and IWYU. The
existing pretty check is also extended to verify the OpenThread public
headers are self-contained and follows IWYU.
This commit is contained in:
Yakun Xu
2025-06-11 06:37:41 +09:00
committed by GitHub
parent c8714060ea
commit 6b03321cb2
86 changed files with 317 additions and 39 deletions
+4
View File
@@ -48,6 +48,8 @@ install_packages_pretty_format()
# add shfmt for shell pretty
command -v shfmt || sudo apt-get install shfmt || echo 'WARNING: could not install shfmt, which is useful if you plan to contribute shell scripts to the OpenThread project.'
sudo apt-get --no-install-recommends install -y iwyu || echo 'WARNING: iwyu, which is useful to ensure applying the IWYU rules.'
}
install_packages_apt()
@@ -122,6 +124,8 @@ install_packages_brew()
# add yapf for pretty
python3 -m pip install yapf || echo 'Failed to install python code formatter yapf. Install it manually if you need.'
brew install include-what-you-use || echo 'WARNING: iwyu, which is useful to ensure applying the IWYU rules.'
}
install_packages_source()