For formatting proto files, we currently use clang-format. Afaik, this was inherited from the sdk with #2672. Alternatively, we could consider using buf which is already used in the Makefile for the proto-lint and proto-check-breaking rules.
Hmm, I must admit I do kind of like the formatting clang-format provides wrt to spacing and aligning field number ordering.
But I'd be open to looking into this a bit more 👍
Summary
For formatting proto files, we currently use
clang-format
. Afaik, this was inherited from the sdk with #2672. Alternatively, we could consider usingbuf
which is already used in the Makefile for theproto-lint
andproto-check-breaking
rules.See https://github.com/cosmos/ibc-go/pull/3640#discussion_r1204199620 for some context on why this issue was opened.
Pros
clang-format
is a pretty popular binary) be present.Cons
Here's a sample diff from formatting
client.proto
with buf:For Admin Use