Skip to content

Use buf to format proto files - #12841

Merged
dmcgowan merged 3 commits into
containerd:mainfrom
mxpv:fmt
Feb 7, 2026
Merged

dmcgowan merged 3 commits into
containerd:mainfrom
mxpv:fmt

Conversation

@mxpv

@mxpv mxpv commented Jan 31, 2026 •

Copy link
Copy Markdown
Member

We've integrated buf in #12762
buf comes with an integrated linter and formatter.

This PR updates Makefile targets to use buf format to format proto files.

Our current proto formatter is pretty rudimentary. It only requires tabs instead of spaces. But would happily pass everything else (like double tabs).

buf is much more sophisticated and can handle pretty complex cases, which is nice.
It also comes with github actions integration out of the box.

The only downside is that buf accepts no configuration leaving no way to amend how proto files are formatted.
And by default, they use 2 spaces instead of tabs. I'm not sure is this is going to be a deal breaker for us

mxpv added 2 commits January 30, 2026 18:17
Signed-off-by: Maksym Pavlenko <[email protected]>
Signed-off-by: Maksym Pavlenko <[email protected]>
Signed-off-by: Maksym Pavlenko <[email protected]>
@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Feb 7, 2026
@dmcgowan
dmcgowan added this pull request to the merge queue Feb 7, 2026
Merged via the queue into containerd:main with commit dbf7d64 Feb 7, 2026
55 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/toolchain Build and Release Toolchain size/XXL

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants