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 15 commits 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.

According to https://golang.org/s/generatedcode the generated
Go code should have a comment matches the following regexp:
```
^// Code generated .* DO NOT EDIT\.$
```
@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
JacobOaks and others added 12 commits March 2, 2024 12:37
Create dependabot.yml
This solves uber-go#139 by referencing actions by sha rather than directly by version.

We also update all of the actions we use at the same time.
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@d9f34f8...eaaf4be)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This references fossa workflow actions by SHA, which uber-go#141 missed.
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@1e31de5...b4ffde6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.3.3 to 0.4.6.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](dominikh/go-tools@v0.3.3...v0.4.6)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@704facf...e12d46a)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.3 to 4.0.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@e12d46a...13aacd8)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@eaaf4be...4fe8c5f)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
According to https://golang.org/s/generatedcode the generated
Go code should have a comment matches the following regexp:
```
^// Code generated .* DO NOT EDIT\.$
```
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