You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This leads to the following error when running bazelisk lint //pw_rpc:echo_cc.pwpb:
➜ pigweed git:(af6a29e26) ✗ bazelisk lint //pw_rpc:echo_cc.pwpb
2024/10/08 14:55:38 Using unreleased version at commit 1ff5af18d045e8f30a2a0367470db4e8225a785c
2024/10/08 14:55:38 Using unreleased version at commit 1ff5af18d045e8f30a2a0367470db4e8225a785c
ERROR: /usr/local/google/home/cramertj/src/pigweed/pw_rpc/BUILD.bazel:486:17: in //tools/lint:linters.bzl%clang_tidy aspect on _pwpb_proto_library rule //pw_rpc:echo_cc.pwpb:
Traceback (most recent call last):
File "/tmp/bazel_output_user_root/02fd49830a521506a99f19a1e23f8759/external/aspect_rules_lint+/lint/clang_tidy.bzl", line 312, column 33, in _clang_tidy_aspect_impl
files_to_lint = _filter_srcs(ctx.rule)
File "/tmp/bazel_output_user_root/02fd49830a521506a99f19a1e23f8759/external/aspect_rules_lint+/lint/clang_tidy.bzl", line 149, column 38, in _filter_srcs
return [s for s in rule.files.srcs if _is_source(s)]
Error: No attribute 'srcs' in files. Make sure there is a label or label_list type attribute with this name
Available attributes: _action_listener, _config_dependencies, aspect_hints, compatible_with, deps, exec_compatible_with, package_metadata, protos, restricted_to, target_compatible_with, toolchains
Target //pw_rpc:echo_cc.pwpb failed to build
ERROR: Analysis of aspects '[//tools/lint:linters.bzl%clang_tidy, //tools/lint:linters.bzl%ruff] with parameters {} on //pw_rpc:echo_cc.pwpb' failed; build aborted: Analysis of target '//pw_rpc:echo_cc.pwpb' failed
INFO: Elapsed time: 0.236s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
Version
Output of bazel --version: aspect 2024.40.2-a7ed65a (with local changes)
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file: bazel_dep(name = "aspect_rules_lint", version = "1.0.2")
How to reproduce
Create a `rule` which provides `CcInfo` but does not have a `srcs` label field, then run the `clang-tidy` linter on that rule.
Any other information?
No response
The text was updated successfully, but these errors were encountered:
What happened?
rules_lint/lint/clang_tidy.bzl
Lines 309 to 312 in 559ed12
assumes that all
CcInfo
rules have asrcs
label list:rules_lint/lint/clang_tidy.bzl
Lines 145 to 149 in 559ed12
In my project (Pigweed) we have custom
pwpb_proto_library
rule which providesCcInfo
but does not have asrcs
list:https://github.com/google/pigweed/blob/8bd77aba07ab3dce5220b23994cd3ecfbcefda10/pw_protobuf_compiler/pw_proto_library.bzl#L536-L549
This leads to the following error when running
bazelisk lint //pw_rpc:echo_cc.pwpb
:Version
Output of
bazel --version
:aspect 2024.40.2-a7ed65a (with local changes)
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:bazel_dep(name = "aspect_rules_lint", version = "1.0.2")
How to reproduce
Any other information?
No response
The text was updated successfully, but these errors were encountered: