diff --git a/clang_tidy/clang_tidy.bzl b/clang_tidy/clang_tidy.bzl index c52dbbb..7ddc5c7 100644 --- a/clang_tidy/clang_tidy.bzl +++ b/clang_tidy/clang_tidy.bzl @@ -97,7 +97,7 @@ def _rule_sources(ctx): if hasattr(ctx.rule.attr, "hdrs"): for hdr in ctx.rule.attr.hdrs: srcs += [hdr for hdr in hdr.files.to_list() if hdr.is_source and check_valid_file_type(hdr)] - return srcs + return [src for src in srcs if 'src/mongo/' in src.path] def _toolchain_flags(ctx, action_name = ACTION_NAMES.cpp_compile): cc_toolchain = find_cpp_toolchain(ctx)