How to use buf cli to check breaking changes against one file

489 Views Asked by At

Buf is a tool to make Protobuf reliable and user friendly for service owners and clients. Has anyone tried using buf breaking command against one single file to detect any breaking changes for that proto file? The buf doc only mentions running that command against a sub directory and I am wondering if we can run that command against one single file. Thanks.

1

There are 1 best solutions below

1
On

https://docs.buf.build/breaking/usage#limit-to-specific-files is probably what you're looking for, although it's not recommended — from the docs:

it is better to let buf discover all files under management and handle this for you in general, especially when using the FILE category.