quaint-telephone-89068
12/23/2022, 3:29 PMbuf linter (from the backend pants.backend.codegen.protobuf.lint.buf).
My example:
in `pants.toml`:
[GLOBAL]
backend_packages = [
"pants.backend.codegen.protobuf.python",
"pants.backend.codegen.protobuf.lint.buf",
...
]
[buf]
lint_args = [
"--config buf.yaml"
]
file tree:
./
├── proto/
│ ├── user.proto
│ └── BUILD
├── pants.toml
└── buf.yaml
When running:
./pants lint --only=buf-lint ::
I get a Failure: could not read file: open buf.yaml: no such file or directory. My understanding is that it fails because the argument seems to be evaluated at runtime and there's no reason the yaml file should be embedded in the sandbox as I have declared the protos with the target protobuf_sources which only takes proto files.
Enabling --keep-sandboxes=on_failure reveals the yaml config file is not present, as expected.
Maybe this could be a feature request? Like enabling a config param in [buf] section? Let me know!
Also, feel free to ask for any clarification or samples.
Thanks a lot!
Pants version
2.14.0
OS
MacOS
Additional info
Buf config looks like this: sample config
pantsbuild/pantsuser
01/16/2023, 10:36 AM