aspect-build / aspect-build/rules_lint

[Bug]: `buf` configuration does not respect ignores

Open
#222 1 comment 0 reactions 0 assignees View on GitHub
bug can close?
Dominant language
Starlark
Stars
154
Forks
125
Avg merge
3d 21h
Merged PRs (30d)
20

Description

### What happened?

Lint tasks read the buf.yaml file, but appears to be ignoring the lint ignore-related configuration options.
Discussions:
https://bazelbuild.slack.com/archives/C04281DTLH0/p1706921973718409
https://bufbuild.slack.com/archives/CRZ680FUH/p1714768711472079

### Version

Development (host) and target OS/architectures: macOS

Output of `bazel --version`:
bazel version
Bazelisk version: development
Aspect CLI version: 5.9.24
Build label: 7.0.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Dec 11 16:52:42 2023 (1702313562)
Build timestamp: 1702313562
Build timestamp as int: 1702313562

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file: working in the `example` directory of the repo

Language(s) and/or frameworks involved: `buf`

### How to reproduce

Issue reproduced here: https://github.com/aspect-https://github.com/SpencerC/rules_lint/commit/b77cb1aeeb9e0258b20c1814a5f7eb2c144b0ed6
Output:
```
From bazel-out/darwin_arm64-fastbuild/bin/src/buf.foo_proto.aspect_rules_lint.report:
--buf-plugin_out: src/file.proto:1:1:Import "src/unused.proto" is unused.
src/file.proto:1:1:Files must have a package defined.
src/file.proto:1:1:RPC request type "HttpBody" should be named "ReceiveMessageRequest" or "HttpServiceReceiveMessageRequest".
src/file.proto:1:1:RPC response type "Empty" should be named "ReceiveMessageResponse" or "HttpServiceReceiveMessageResponse".
```
Should be:
```
src/file.proto:1:1:Import "src/unused.proto" is unused.
src/file.proto:1:1:Files must have a package defined.
```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in the example directory by reading buf.yaml and the lint task configuration, then run the linked reproduction and inspect the generated .aspect_rules_lint.report. Compare the configured ignore-related options with the diagnostics produced by buf. Done means the report contains only the expected unused-import and missing-package messages, without the naming diagnostics.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.