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

Allow generation of the “Generated by this command” comment to be disabled #104

Closed
skitt opened this issue Oct 9, 2023 · 0 comments · Fixed by #153
Closed

Allow generation of the “Generated by this command” comment to be disabled #104

skitt opened this issue Oct 9, 2023 · 0 comments · Fixed by #153

Comments

@skitt
Copy link

skitt commented Oct 9, 2023

Requested feature
A way to disable generation of the “Generated by this command” comment.

Why the feature is needed
The comment has already been fixed to drop the path to mockgen, since that isn’t necessarily consistent. The same applies to paths provided as arguments; see kubernetes/kubernetes#120969 for one such instance (the copyright_file arguments point to files in temporary directories).

(Optional) Proposed solution
I am about to submit a PR adding an option to take care of this by adding a command-line option to disable it.
Another possibility would be to remove paths from file names provided as arguments, perhaps only if they are absolte, but that may not be generally desirable.

sodul added a commit to sodul/mock that referenced this issue Feb 6, 2024
The invocation command can be user specific, especially if absolute paths are used for the destination. This in turn can cause very large needless diffs that will create lots of source control noise and be distracting in PRs.

To remove these command comments simply pass `--write_command_comment=false` on the CLI. The default behavior is maintained.

Fixes uber-go#104.
JacobOaks pushed a commit that referenced this issue Feb 7, 2024
The invocation command can be user specific, especially if absolute
paths are used for the destination. This in turn can cause very large
needless diffs that will create lots of source control noise and be
distracting in PRs.

To remove these command comments simply pass
`--write_command_comment=false` on the CLI. The default behavior is
maintained.

Fixes #104.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant