-
Notifications
You must be signed in to change notification settings - Fork 3
Buf files #37
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
base: main
Are you sure you want to change the base?
Buf files #37
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,15 @@ | ||||||||||||||||||||||
syntax = "proto3"; | ||||||||||||||||||||||
|
||||||||||||||||||||||
package exampletest; | ||||||||||||||||||||||
|
||||||||||||||||||||||
message user_info { | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion PascalCase message names are required – rename Lower-snake message identifiers violate Google & Buf style guides and will be flagged ( -message user_info {
+message UserInfo { 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||
string full_name = 1; | ||||||||||||||||||||||
int32 age_years = 2; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
||||||||||||||||||||||
enum status { | ||||||||||||||||||||||
UNKNOWN = 0; | ||||||||||||||||||||||
ACTIVE = 1; | ||||||||||||||||||||||
INACTIVE = 2; | ||||||||||||||||||||||
} | ||||||||||||||||||||||
Comment on lines
+10
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Enum & value naming do not comply with proto3 conventions.
-enum status {
- UNKNOWN = 0;
- ACTIVE = 1;
- INACTIVE = 2;
+enum Status {
+ STATUS_UNKNOWN = 0;
+ STATUS_ACTIVE = 1;
+ STATUS_INACTIVE = 2;
} 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Package-directory mismatch breaks
buf lint
&buf build
.buf
expects every file declaringpackage exampletest;
to live underexampletest/
.Because
bad.proto
sits at repository root (.
), CI will fail withPACKAGE_DIRECTORY_MATCH
.Move the file or change the
package
declaration so they match.🧰 Tools
🪛 Buf (1.55.1)
3-3: Files with package "exampletest" must be within a directory "exampletest" relative to root but were in directory ".".
(PACKAGE_DIRECTORY_MATCH)
🤖 Prompt for AI Agents