Skip to content

[misc] buf cli proto lint, format and gen #3649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

pnmcosta
Copy link
Contributor

@pnmcosta pnmcosta commented Apr 9, 2025

Describe your changes

This PR introduces the buf cli tool.

It offers various features, including code generation, breaking change detection, linting, and formatting, to assist with Protobuf development and maintenance.

Source: https://buf.build/docs/cli/

One of the challenges with Protobuf code generation is the complexity of working with protoc and plugins. Managing and maintaining a stable environment locally on a single machine is hard enough given the complex web of different compiler and plugin versions. The problem is compounded as you scale out code generation across many developers, and often results in a series of ugly bash scripts shared between team members.

Source: https://buf.build/docs/generate/overview/

Buf's remote plugins remove a key obstacle to generating code from Protobuf files—protoc plugins are developed across many languages, and manual installation is inconsistent as a result. Managing and maintaining a stable environment on a single machine is hard enough, and the problem is compounded as you scale out code generation across many developers.

Source: https://buf.build/docs/bsr/remote-plugins/overview/

Quickstart: https://buf.build/docs/cli/quickstart/#generate-go-and-connect-stubs
Generate Tutorial: https://buf.build/docs/generate/tutorial/
Breaking Tutorial: https://buf.build/docs/breaking/tutorial/
Lint Tutorial: https://buf.build/docs/lint/tutorial/#inspect-the-workspace

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant