Skip to content

Commit

Permalink
Check files in hdrs
Browse files Browse the repository at this point in the history
See original PR: #13
  • Loading branch information
erenon committed Jan 8, 2024
1 parent d2aecc5 commit f43f9d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ Checks: >
google-*,
performance-*,
HeaderFilterRegex: ".*"

WarningsAsErrors: "*"
3 changes: 3 additions & 0 deletions clang_tidy/clang_tidy.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def _rule_sources(ctx):
if hasattr(ctx.rule.attr, "srcs"):
for src in ctx.rule.attr.srcs:
srcs += [src for src in src.files.to_list() if src.is_source and check_valid_file_type(src)]
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

def _toolchain_flags(ctx, action_name = ACTION_NAMES.cpp_compile):
Expand Down

0 comments on commit f43f9d6

Please sign in to comment.