Skip to content

buf format#9663

Open
stephanos wants to merge 6 commits intomainfrom
stephanos/buf-format
Open

buf format#9663
stephanos wants to merge 6 commits intomainfrom
stephanos/buf-format

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented Mar 25, 2026

What changed?

Adds buf format as a Makefile target; and integrates it into make fmt.

All .proto changes are from running make fmt.

Why?

Consistent protobuf file style.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@stephanos stephanos force-pushed the stephanos/buf-format branch from e365bae to c7fcb4a Compare March 25, 2026 20:10
fmt-protos: $(BUF)
@printf $(COLOR) "Formatting proto files..."
@$(BUF) format -w $(PROTO_ROOT)/internal
@$(BUF) format -w --config chasm/lib/buf.yaml chasm/lib
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(1) added new Makefile target

@$(BUF) lint --config chasm/lib/buf.yaml $(CHASM_BINPB)

fmt: fmt-gofix fmt-imports fmt-yaml
fmt: fmt-gofix fmt-imports fmt-protos fmt-yaml
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(2) included new Makefile target in fmt target

cache: true

- name: format golang import statements
- name: apply formatters
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(3) Renamed CI build step

@stephanos stephanos force-pushed the stephanos/buf-format branch from c7fcb4a to 9dd7e76 Compare March 25, 2026 20:13
@stephanos stephanos marked this pull request as ready for review March 25, 2026 20:15
@stephanos stephanos requested review from a team as code owners March 25, 2026 20:15
@stephanos stephanos force-pushed the stephanos/buf-format branch from 9dd7e76 to 0e4d7c2 Compare March 25, 2026 21:41
Copy link
Copy Markdown
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stephanos stephanos force-pushed the stephanos/buf-format branch from 0e4d7c2 to 43506e2 Compare March 26, 2026 00:58
@stephanos stephanos requested a review from a team as a code owner March 26, 2026 00:58
@stephanos stephanos requested a review from a team as a code owner March 26, 2026 00:59
@stephanos stephanos enabled auto-merge (squash) March 26, 2026 01:00
Comment on lines 3 to -4
package temporal.server.api.adminservice.v1;
option go_package = "go.temporal.io/server/api/adminservice/v1;adminservice";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda like how they are grouped together before... but looks like that's not the standard...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I briefly checked buf is doing the right thing here; and I found the official Google style guide that confirms it 👍

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.

3 participants