Skip to content

Commit

Permalink
fix: Add implementation_deps to the compilation_context used for clan…
Browse files Browse the repository at this point in the history
…g-tidy (#421)
  • Loading branch information
jsharpe authored Oct 29, 2024
1 parent 86ba682 commit 8c8834a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lint/clang_tidy.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ def _clang_tidy_aspect_impl(target, ctx):

files_to_lint = _filter_srcs(ctx.rule)
compilation_context = target[CcInfo].compilation_context
if hasattr(ctx.rule.attr, "implementation_deps"):
compilation_context = cc_common.merge_compilation_contexts(
compilation_contexts = [compilation_context] +
[implementation_dep[CcInfo].compilation_context for implementation_dep in ctx.rule.attr.implementation_deps])

if ctx.attr._options[LintOptionsInfo].fix:
outputs, info = patch_and_output_files(_MNEMONIC, target, ctx)
else:
Expand Down

0 comments on commit 8c8834a

Please sign in to comment.