Skip to content
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

Protobuf linter #532

Merged
merged 3 commits into from
Aug 19, 2024
Merged

Protobuf linter #532

merged 3 commits into from
Aug 19, 2024

Conversation

fernandofcampos
Copy link
Contributor

@fernandofcampos fernandofcampos commented Aug 18, 2024

Purpose of Changes and their Description

Use Buf as a linter for protobufs.

Link(s) to Ticket(s) or Issue(s) resolved by this PR

https://linear.app/alloralabs/issue/PROTO-2132

Are these changes tested and documented?

Covered by existing unit tests and integration tests.

Still Left Todo

Fill this out if this is a Draft PR so others can help.

Copy link

github-actions bot commented Aug 18, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed⏩ skippedAug 18, 2024, 10:05 PM

@fernandofcampos fernandofcampos force-pushed the PROTO-2132 branch 2 times, most recently from e86a8d9 to fc06b58 Compare August 18, 2024 22:12
Copy link

github-actions bot commented Aug 18, 2024

The latest Buf updates on your PR. Results from workflow Buf Linter / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedAug 19, 2024, 3:55 PM

@fernandofcampos fernandofcampos force-pushed the PROTO-2132 branch 7 times, most recently from b842c16 to f69e734 Compare August 18, 2024 22:49
@relyt29
Copy link
Contributor

relyt29 commented Aug 19, 2024

I looked over some of the changes but I just want to make explicitly sure: none of the actual contents of the .proto files have been changed, right, the protos are just being reformatted with a different formatter right?

@relyt29
Copy link
Contributor

relyt29 commented Aug 19, 2024

oh another question: if we have this new linter, what will be the new formatter command to format our protobufs for us (and does it have a visual studio code integation)

@fernandofcampos
Copy link
Contributor Author

I looked over some of the changes but I just want to make explicitly sure: none of the actual contents of the .proto files have been changed, right, the protos are just being reformatted with a different formatter right?

Some were changed. Please check my first commit: 1626cb1

It has all changes related to the linter findings. The second commit has the reformat changes.

@fernandofcampos
Copy link
Contributor Author

oh another question: if we have this new linter, what will be the new formatter command to format our protobufs for us (and does it have a visual studio code integation)

The linter and the formatter use the same tool, Buf, that was already being used to generate the protobufs.

If you run make on x/emissions/Makefile (for instance) it will format, lint and generate. But there is a separated command to format: make proto-format

Let me know if you want me to change it. I will check about VSCode.

@fernandofcampos
Copy link
Contributor Author

oh another question: if we have this new linter, what will be the new formatter command to format our protobufs for us (and does it have a visual studio code integation)

There is a VSCode extension: https://marketplace.visualstudio.com/items?itemName=bufbuild.vscode-buf

### Build ###
#################

build:
Copy link
Contributor

Choose a reason for hiding this comment

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

can we not delete the build and test commands? I use them

x/mint/Makefile Outdated
### Build ###
#################

build:
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment here, I object to the removal of make build and make test

Copy link
Contributor

@relyt29 relyt29 left a comment

Choose a reason for hiding this comment

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

Ok I looked over the commit you highlighted and also then the total PR

left two comments about a minor thing, please don't delete make test and make build other than that I'm good with the changes

Signed-off-by: Fernando Campos <fernandofcampos@gmail.com>
Signed-off-by: Fernando Campos <fernandofcampos@gmail.com>
Signed-off-by: Fernando Campos <fernandofcampos@gmail.com>
@fernandofcampos fernandofcampos merged commit e1a68d9 into dev Aug 19, 2024
8 checks passed
@fernandofcampos fernandofcampos deleted the PROTO-2132 branch August 19, 2024 16:36
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.

2 participants