Skip to content

Commit 276963e

Browse files
committed
Run buildifier on new changes
1 parent 0437291 commit 276963e

4 files changed

Lines changed: 21 additions & 13 deletions

File tree

MODULE.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ module(name = "rules_codechecker")
1818

1919
bazel_dep(name = "rules_python", version = "0.38.0")
2020
bazel_dep(name = "rules_cc", version = "0.2.16")
21+
2122
#python = use_extension("@rules_python//python/extensions:python.bzl", "python")
2223
#python.toolchain(
2324
# python_version = "3.10",
2425
# is_default = True,
2526
#)
2627
codechecker_extension = use_extension(
27-
"//src:tools.bzl", "module_register_default_codechecker")
28+
"//src:tools.bzl",
29+
"module_register_default_codechecker",
30+
)
2831
use_repo(codechecker_extension, "default_codechecker_tools")

src/codechecker.bzl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ load(
2727
)
2828
load(
2929
"common.bzl",
30+
"python_interpreter_tool",
3031
"python_path",
3132
"python_toolchain_type",
3233
"version_specific_attributes",
33-
"python_interpreter_tool",
3434
)
3535
load(
3636
"compile_commands.bzl",
@@ -237,6 +237,7 @@ def _codechecker_test_impl(ctx):
237237
"{Severities}": " ".join(ctx.attr.severities),
238238
},
239239
)
240+
240241
# For use in script the short path must be used (or absolute path)
241242
# For use in executable the full path
242243
python_interpreter_path = python_path(ctx)
@@ -250,15 +251,15 @@ def _codechecker_test_impl(ctx):
250251
{} {}
251252
""".format(
252253
python_interpreter_path,
253-
ctx.outputs.codechecker_test_script.short_path
254-
)
254+
ctx.outputs.codechecker_test_script.short_path,
255+
),
255256
)
256257

257258
# Return test script and all required files
258259
run_files = default_runfiles + [
259260
ctx.outputs.codechecker_test_script,
260261
ctx.outputs.test_script_wrapper,
261-
] + python_interpreter_tool(ctx)
262+
] + python_interpreter_tool(ctx)
262263

263264
return [
264265
DefaultInfo(

src/common.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def python_path(ctx):
6161
elif hasattr(py_toolchain, "py3_runtime"):
6262
py_runtime = py_toolchain.py3_runtime
6363
python_path = py_runtime.interpreter_path
64+
6465
# @rules_python does not provide interpreter_path, but interpreter.path
6566
if python_path == None:
6667
python_path = py_runtime.interpreter.path

src/per_file.bzl

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ for each translation unit.
1919

2020
load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
2121
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
22+
load("@default_codechecker_tools//:defs.bzl", "BAZEL_VERSION")
2223
load("codechecker_config.bzl", "get_config_file")
24+
load(
25+
"common.bzl",
26+
"python_interpreter_tool",
27+
"python_path",
28+
"python_toolchain_type",
29+
)
2330
load(
2431
"compile_commands.bzl",
2532
"SourceFilesInfo",
2633
"compile_commands_aspect",
2734
"compile_commands_impl",
2835
"platforms_transition",
2936
)
30-
load("common.bzl",
31-
"python_path",
32-
"python_toolchain_type",
33-
"python_interpreter_tool",
34-
)
35-
load("@default_codechecker_tools//:defs.bzl", "BAZEL_VERSION")
3637

3738
def _run_code_checker(
3839
ctx,
@@ -63,7 +64,7 @@ def _run_code_checker(
6364
ctx.outputs.per_file_script,
6465
compile_commands_json,
6566
config_file,
66-
] + sources_and_headers
67+
] + sources_and_headers
6768
else:
6869
# NOTE: we collect only headers, so CTU may not work!
6970
headers = depset(transitive = target[SourceFilesInfo].headers.to_list())
@@ -73,7 +74,9 @@ def _run_code_checker(
7374
compile_commands_json,
7475
config_file,
7576
src,
76-
], transitive = [headers])
77+
],
78+
transitive = [headers],
79+
)
7780

7881
outputs = [clang_tidy_plist, clangsa_plist, codechecker_log]
7982

0 commit comments

Comments
 (0)