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

Add external includes to clang-tidy invocation #68

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

michael-ahn
Copy link
Contributor

  • This uses bazel's external_includes to account for external dependencies' headers (e.g. @my_library in cc_library.deps)
  • Current workaround is to manually add paths via bazel flags, e.g. build:clang-tidy --copt=-isystem./external/my_library/include; with this change this is no longer needed

 - Current workaround is to manually add paths, e.g. `build:clang-tidy --copt=-isystem./external/mylibrary/include`
 - This uses bazel's [`external_includes`](https://bazel.build/rules/lib/builtins/CompilationContext#external_includes) to fix this
@eneev-a
Copy link

eneev-a commented Oct 2, 2024

This would be good to get in:

https://bazel.build/rules/lib/builtins/CompilationContext#external_includes says that these external_includes usually included with angle brackets:

depset CompilationContext.external_includes
Returns the set of search paths (as strings) for external header files referenced by angle bracket. Usually passed with -isystem.

@dotnwat
Copy link

dotnwat commented Oct 2, 2024

+1

@erenon erenon merged commit cd2c6ef into erenon:master Oct 3, 2024
1 check passed
@erenon
Copy link
Owner

erenon commented Oct 3, 2024

Thanks! Merged.

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.

4 participants