Include what you use cout and printf #94
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is a continuation of #61. I'm not sure if somethings like this should go in https://github.com/google/styleguide.
I wanted to have the tool to be a little more pushier on whether an include is present. The problem that I've seen is that unrelated changed in include paths can break cc files. For example, in debug mode there may be additional includes for printing. I wanted the tool to capture those issues without having to compile in both modes.
I noticed that it backs off a little if the file has a compilation file extension (.cc, .cpp, etc). I'm not sure if that will open the door to false positives. It might be better to keep this tool as it is and use another tool instead for more rigorous IWYU problems: https://github.com/include-what-you-use/include-what-you-use.