prehistoric-afternoon-67621
05/04/2022, 2:24 PM[buf].config = "build-support/proto/buf.yaml"
but I see that's not an option just yet. I tried [buf].lint_args = ["--config", "build-support/proto/buf.yaml"]
but that didn't work as it seems buf is not running from the build root. Anyone have any suggestions?happy-kitchen-89482
05/04/2022, 2:28 PMhappy-kitchen-89482
05/04/2022, 2:29 PMprehistoric-afternoon-67621
05/04/2022, 2:30 PMnarrow-vegetable-37489
05/04/2022, 2:31 PM[buf].lint_args
. I can take a look at adding support for config files when work is less hectic, but as @happy-kitchen-89482 said it shouldn't be too hard to implement if you wanna give it a go :)prehistoric-afternoon-67621
05/04/2022, 2:32 PMhundreds-father-404
05/04/2022, 3:25 PM[buf].lint_args = ["--config", "build-support/proto/buf.yaml"]
is Pants won't know to include the file in the sandbox
@prehistoric-afternoon-67621 would you mind opening an issue w/ this feature request? I would be happy to add some instructions on how to implement this - I think it's literally like 10 lines of code. Hardest part is figuring out what Buf's config autodiscovery mechanism looks likehappy-kitchen-89482
05/04/2022, 4:02 PMhundreds-father-404
05/04/2022, 4:04 PMnarrow-vegetable-37489
05/04/2022, 4:07 PM--config
actually expects the config itself and not a path, so you could do --config='$(cat path/to/buf.yml)'
and it should work :)narrow-vegetable-37489
05/04/2022, 4:07 PMhundreds-father-404
05/04/2022, 4:08 PM./pants --buf-args="--config='$(cat path/to/buf/yml)'" fmt ::
on the CLI, but cat
interpolation won't work in config filenarrow-vegetable-37489
05/04/2022, 4:10 PMnarrow-vegetable-37489
05/04/2022, 4:11 PMnarrow-vegetable-37489
05/04/2022, 4:11 PMprehistoric-afternoon-67621
05/04/2022, 4:30 PM[buf].lint_args="--config='{\"version\":\"v1\", ...}'"
I will open a feature request when I have some time.prehistoric-afternoon-67621
05/06/2022, 2:01 PMhundreds-father-404
05/06/2022, 3:23 PMprehistoric-afternoon-67621
05/06/2022, 3:24 PM