Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/codechecker.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ def codechecker_test(
if per_file:
per_file_test(
name = name,
platform = platform,
targets = targets,
options = analyze,
skip = skip,
Expand Down
13 changes: 12 additions & 1 deletion src/per_file.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ for each translation unit.

load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
load("codechecker_config.bzl", "get_config_file")
load(
"common.bzl",
"version_specific_attributes",
)
load(
"compile_commands.bzl",
"SourceFilesInfo",
"compile_commands_aspect",
"compile_commands_impl",
"platforms_transition",
)

# buildifier: disable=unused-variable
Expand Down Expand Up @@ -261,6 +266,7 @@ per_file_test = rule(
attrs = {
"config": attr.label(
default = None,
cfg = platforms_transition,
doc = "CodeChecker configuration",
),
"default_options": attr.string_list(
Expand All @@ -274,6 +280,10 @@ per_file_test = rule(
default = [],
doc = "List of CodeChecker options, e.g.: --ctu",
),
"platform": attr.string(
default = "", #"@platforms//os:linux",
doc = "Platform to build for",
),
"skip": attr.string_list(
default = [],
doc = "List of skip/ignore file rules. " +
Expand All @@ -283,6 +293,7 @@ per_file_test = rule(
aspects = [
compile_commands_aspect,
],
cfg = platforms_transition,
doc = "List of compilable targets which should be checked.",
),
"toolchain": attr.label(
Expand All @@ -297,7 +308,7 @@ per_file_test = rule(
cfg = "target",
default = ":per_file_script",
),
},
} | version_specific_attributes(),
outputs = {
"compile_commands": "%{name}/compile_commands.json",
"test_script": "%{name}/test_script.sh",
Expand Down
Loading