Skip to content

record invocation arguments in generated code#31

Merged
sywhang merged 1 commit intouber-go:mainfrom
kucherenkovova:invocation-arguments
Jul 13, 2023
Merged

record invocation arguments in generated code#31
sywhang merged 1 commit intouber-go:mainfrom
kucherenkovova:invocation-arguments

Conversation

@kucherenkovova
Copy link
Copy Markdown
Contributor

resolves #554

@CLAassistant
Copy link
Copy Markdown

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
Copy Markdown
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, " "))

@kucherenkovova kucherenkovova requested a review from sywhang July 13, 2023 06:52
Copy link
Copy Markdown
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
ErfanMomeniii pushed a commit to ErfanMomeniii/mock that referenced this pull request Jul 15, 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