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

Add codegen comment to protoc-gen-go-helpers outputs #132

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

tdeebswihart
Copy link
Contributor

What changed?
I added a comment to all files generated by protoc-gen-go-helpers that GitHub can use to ID them as generated

Why?
This way GitHub automatically marks them as generated files and will hide their diffs in PRs by default

How did you test it?
I ran it

Potential risks
None

This way GitHub automatically marks them as generated files and will
hide their diffs in PRs by default
@tdeebswihart tdeebswihart requested review from a team as code owners November 22, 2023 01:06
@@ -59,7 +59,7 @@ type (
const (
msgImport = "google.golang.org/protobuf/proto"
enumImport = "fmt"
headerTmpl = `
headerTmpl = `// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
Copy link
Member

Choose a reason for hiding this comment

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

I'd add a blank line in between just so it doesn't look like a doc comment on the package

@tdeebswihart tdeebswihart merged commit 237e45a into master Nov 22, 2023
3 checks passed
@tdeebswihart tdeebswihart deleted the tdeebswihart/code-gen-by branch November 22, 2023 01:11
@@ -60,6 +60,7 @@ const (
msgImport = "google.golang.org/protobuf/proto"
enumImport = "fmt"
headerTmpl = `
// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
Copy link
Member

Choose a reason for hiding this comment

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

I meant in between the comment and the package line. I believe godoc interprets a comment on package as documentation for the package itself

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