Skip to content

Commit 4ebd661

Browse files
committed
cr_checker: Forward target_compatible_with
With this change we enable to mark the cr_checker compatible with certan targets (e.g. Linux). This will enable that people can also test //... for other platforms, where the copyright checker shall not run (e.g. QNX).
1 parent 07c6fdf commit 4ebd661

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cr_checker/cr_checker.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def copyright_checker(
2727
remove_offset = 0,
2828
debug = False,
2929
use_memory_map = False,
30-
fix = False):
30+
fix = False,
31+
target_compatible_with = None):
3132
"""
3233
Defines a custom build rule for checking and optionally fixing files for compliance
3334
with specific requirements, such as copyright headers.
@@ -109,12 +110,14 @@ def copyright_checker(
109110
args = args,
110111
data = data,
111112
visibility = visibility,
113+
target_compatible_with = target_compatible_with,
112114
)
113115

114116
native.alias(
115117
name = "copyright-check",
116118
actual = ":" + name + ".check",
117119
visibility = visibility,
120+
target_compatible_with = target_compatible_with,
118121
tags = [
119122
"cli_help=Check for license headers:\n" +
120123
"bazel run //:copyright-check",

0 commit comments

Comments
 (0)