atomic icon indicating copy to clipboard operation
atomic copied to clipboard

Update comments in generated code to align with Go standards

Open alexandear opened this issue 2 years ago • 3 comments

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.

alexandear avatar Feb 17 '23 20:02 alexandear

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 17 '23 20:02 CLAassistant

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.?

prashantv avatar Mar 05 '23 21:03 prashantv

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 avatar Mar 06 '23 08:03 alexandear