Skip to content

Make buf a tool #1067

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 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make buf a tool
  • Loading branch information
pat-trunk-io committed Jul 7, 2025
commit 0b511a2122dc48f32de0843ed78263c43f7f5321
7 changes: 3 additions & 4 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ plugins:
- id: trunk
local: .

- id: configs
uri: https://github.com/trunk-io/configs
ref: v1.0.12

runtimes:
enabled:
- node@22.16.0
Expand Down Expand Up @@ -46,6 +42,9 @@ lint:
success_codes: [0]
enabled:
# enabled linters inherited from github.com/trunk-io/configs plugin
- buf-breaking@1.55.1
- buf-format@1.55.1
- buf-lint@1.55.1
- pmd@pmd_releases/7.12.0
- definition-checker
- eslint@9.27.0
Expand Down
33 changes: 3 additions & 30 deletions linters/buf/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
version: 0.1
lint:
# TODO(Tyler): This should be its own tool if we can avoid the eponymous pitfall
downloads:
- name: buf
version: 1.0.0-rc11
executable: true
downloads:
# macos arm64 was introduced after this version.
- os: macos
version: <0.42.0
url: https://github.com/bufbuild/buf/releases/download/v${version}/buf-Darwin-x86_64
- os:
linux: Linux
cpu:
x86_64: x86_64
arm_64: aarch64
url: https://github.com/bufbuild/buf/releases/download/v${version}/buf-${os}-${cpu}
- os:
macos: Darwin
cpu:
x86_64: x86_64
arm_64: arm64
url: https://github.com/bufbuild/buf/releases/download/v${version}/buf-${os}-${cpu}
- os: windows
cpu:
x86_64: x86_64
arm_64: arm64
url: https://github.com/bufbuild/buf/releases/download/v${version}/buf-Windows-${cpu}.exe
definitions:
- name: buf-format
files: [proto]
Expand Down Expand Up @@ -55,7 +28,7 @@ lint:
- buf.lock
- buf.gen.yaml
- buf.work.yaml
known_good_version: 1.17.0 # format subcommand was added in 1.2.0
known_good_version: 1.55.1 # format subcommand was added in 1.2.0
version_command:
parse_regex: ${semver}
run: buf --version
Expand Down Expand Up @@ -83,7 +56,7 @@ lint:
- buf.gen.yaml
- buf.work.yaml
issue_url_format: https://docs.buf.build/lint/rules#{}
known_good_version: 1.17.0 # newer version is needed to support Windows fully
known_good_version: 1.55.1 # newer version is needed to support Windows fully
version_command:
parse_regex: ${semver}
run: buf --version
Expand Down Expand Up @@ -118,7 +91,7 @@ lint:
- buf.gen.yaml
- buf.work.yaml
issue_url_format: https://docs.buf.build/breaking/rules#{}
known_good_version: 1.5.0
known_good_version: 1.55.1
version_command:
parse_regex: ${semver}
run: buf --version
55 changes: 0 additions & 55 deletions linters/buf/test_data/buf_breaking_v1.32.0_dupFile.check.shot

This file was deleted.

43 changes: 0 additions & 43 deletions linters/buf/test_data/buf_breaking_v1.5.0_basic.check.shot

This file was deleted.

54 changes: 0 additions & 54 deletions linters/buf/test_data/buf_breaking_v1.5.0_dupFile.check.shot

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter buf-breaking test basic 1`] = `
{
Expand Down
43 changes: 0 additions & 43 deletions linters/buf/test_data/buf_breaking_v1.9.0_basic.check.shot

This file was deleted.

14 changes: 0 additions & 14 deletions linters/buf/test_data/buf_format_v1.32.0_buf_lint.fmt.shot

This file was deleted.

92 changes: 0 additions & 92 deletions linters/buf/test_data/buf_lint_v1.32.0_buf_lint.check.shot

This file was deleted.

Loading
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy