adventurous-journalist-72920
12/23/2022, 2:26 PM[buf]
lint_args = [
"--config buf.yaml"
]
and tried several paths, raw or with targets, without any success.
It feels unlikely to work as protos are likely to be declared with protobuf_sources
that does not accept any other file types than .proto
.
A workaround would be to pass the yaml (or json) content of the config file directly in the config option, but it’s not really maintainable as the config grows.
Any idea?fast-nail-55400
12/23/2022, 2:28 PMadventurous-journalist-72920
12/23/2022, 2:29 PMFailure: could not read file: open buf.yaml: no such file or directory
fast-nail-55400
12/23/2022, 2:31 PMadventurous-journalist-72920
12/23/2022, 2:42 PMconfig
option within [buf]
in pants.toml (rather than lint_args and format_args) as the config in the yaml already expects a “lint” and “format” section.
My current need is repo-wide indeed, but no strong opinion to be fair, I just don’t have any example where project-only config would be better.
I have also tried to declare the config file into a resource
target, and add it to the dependencies of my protobuf_source
. I would expect it to be a strong information for pants’ lint
goal to be able to discover the config file automatically, but not quite sure it’s supposed to behave like this.
I’ll open an issue then!