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

record invocation arguments in generated code #31

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

kucherenkovova
Copy link
Contributor

resolves #554

@CLAassistant
Copy link

CLAassistant commented Jul 10, 2023

CLA assistant check
All committers have signed the CLA.

Comment on lines 291 to 296
g.p("")
g.p("// Generated by this command:")
g.p("// %v", strings.Join(os.Args, " "))
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make this part of the same comment block. Otherwise the new comment block becomes separated from the rest of the package level comment.

Suggested change
g.p("")
g.p("// Generated by this command:")
g.p("// %v", strings.Join(os.Args, " "))
g.p("//")
g.p("// Generated by this command:")
g.p("// %v", strings.Join(os.Args, " "))

Copy link
Contributor

@sywhang sywhang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@sywhang sywhang merged commit bdf9df3 into uber-go:main Jul 13, 2023
r-hang pushed a commit that referenced this pull request May 14, 2024
Fixes a regression introduced in #31
(before, mockgen always added an empty line between package comment and
preceding comments).

“Code generated by” block should not be a part of the package comment.
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.

mockgen: record invocation arguments in generated code
3 participants