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

Update comments in generated code to align with Go standards #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandear
Copy link

@alexandear alexandear commented Feb 17, 2023

This PR updates the comments in generated files to match the standard Go regular expression:

^// Code generated .* DO NOT EDIT\.$

For more information, refer to golang/go#13560 and https://go.dev/s/generatedcode.

@CLAassistant
Copy link

CLAassistant commented Feb 17, 2023

CLA assistant check
All committers have signed the CLA.

@prashantv
Copy link
Collaborator

I think the @generated was added for some tools, and aligns with https://generated.at/

How about // @generated Code generated by gen-atomicwrapper. DO NOT EDIT.?

@alexandear
Copy link
Author

alexandear commented Mar 6, 2023

This comment

// @generated Code generated by gen-atomicwrapper. DO NOT EDIT.

won't pass the regular expression (Go syntax)

^// Code generated .* DO NOT EDIT\.$

If we really need @generated marked I propose

// Code generated @generated by gen-atomicwrapper. DO NOT EDIT.

or with two lines

// Code generated by gen-atomicwrapper. DO NOT EDIT.
// @generated by gen-atomicwrapper.

The first line mark Go generated files so all the Go tools recognize it, and the second line is for tools supporting https://generated.at.

@alexandear alexandear changed the title Change generated code comment to match common Go Update comments in generated code to align with Go standards Mar 2, 2024
According to https://golang.org/s/generatedcode the generated
Go code should have a comment matches the following regexp:
```
^// Code generated .* DO NOT EDIT\.$
```
@ccoVeille
Copy link

You are pretty consistent and patient with this 2 years old PR

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.

4 participants