Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iwyu: add map file to correctly and deterministicly lint includes #2837

Merged
merged 2 commits into from
May 17, 2024

Conversation

joholl
Copy link
Collaborator

@joholl joholl commented May 13, 2024

Firstly, add json-c include flags to some tests to get rid of the leading json-c/ when including.

Secondly, with map files, we can control how iwyu deals with facade headers (like json.h) and where to get certain symbols from. Add a map file and have iwyu be more deterministic about its changes.

I also changed the documentation a bit, including fixing a typo (-Xiwyu), adding -j, piping directly (fix_includes would sometimes not apply all changes) etc.

Note that depending on the system, some files might be compiled or not compiled (or compiled differently). E.g. on my system I had libtpms installed, so tcti-libtpms was linted additionally.

@joholl joholl force-pushed the iwyu branch 3 times, most recently from c99a369 to 5687567 Compare May 16, 2024 12:28
Signed-off-by: Johannes Holland <[email protected]>
@joholl
Copy link
Collaborator Author

joholl commented May 17, 2024

This is ready for review now.

In the future, we probably want to add a check to our ci.

@joholl joholl merged commit 7543041 into tpm2-software:master May 17, 2024
25 checks passed
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.

2 participants