Add generated file comment at top of files.#169
Draft
bstoll wants to merge 3 commits intoopenconfig:mainfrom
Draft
Add generated file comment at top of files.#169bstoll wants to merge 3 commits intoopenconfig:mainfrom
bstoll wants to merge 3 commits intoopenconfig:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ygnmi generated code has a package comment identifying the files are generated, but this does not match the common Go style used - the terms "generated package" or "package was generated by" do not appear very often in other Go code generators that I can find. The comment
// Code generated by [package]. DO NOT EDIT.seems to be quite common - it is used in the Go source and tooling like protoc.The inspiration for this change is GitHub will hide generated code diff changes in PRs if it matches this pattern. Users can define a .gitattributes file in their repo to manually identify generated files, but if we make the change in ygot/ygnmi users will not need to do this. This makes it much easier to review pull requests where a minor change can result in a large number of generated file changes.
This PR is a child to openconfig/ygot#1057 - this PR will only make sense to merge after a tagged release of the ygot changes is made and ygnmi can be updated here to depend on the new release to cover all the header updates.