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

Open
opened 2025-11-20 08:07:11 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/3649

State: closed
Merged: No


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

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
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/3649 **State:** closed **Merged:** No --- ## Describe your changes This PR introduces the [buf cli](https://buf.build/product/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 - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2025-11-20 08:07:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#3845