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

Split the Package comment from the "boilerplate" comments #111

Closed
dlsniper opened this issue Oct 16, 2023 · 1 comment
Closed

Split the Package comment from the "boilerplate" comments #111

dlsniper opened this issue Oct 16, 2023 · 1 comment

Comments

@dlsniper
Copy link
Contributor

dlsniper commented Oct 16, 2023

Actual behavior A clear and concise description of what the bug is.
The package comments are generated like this:

//	mockgen -destination demo/mock.go -package demo . Demoer
//
// Package demo is a generated GoMock package.
package demo

However, this is not correct, as it doesn't follow the package guidelines documented here: https://staticcheck.io/docs/checks#ST1000

Expected behavior A clear and concise description of what you expected to
happen.

I expect the generated code to be:

//	mockgen -destination demo/mock.go -package demo . Demoer
//

// Package demo is a generated GoMock package.
package demo

This would follow the guidelines and make the linter happy too.

To Reproduce Steps to reproduce the behavior

  1. Run mockgen -destination demo/mock.go -package demo . Demoer on any interface/package
  2. Observe the results

Additional Information

  • gomock mode (reflect or source): source
  • gomock version or git ref: v0.3.1-0.20231011042131-892b665398ec
  • golang version: go version go1.21.3 linux/amd64
  • staticcheck version: v0.5.0-0.dev.0.20230826160118-ad5ca31ff221

Triage Notes for the Maintainers

Here's an attempt at fixing the issue: #112.

@JacobOaks
Copy link
Collaborator

Closing since #112 was merged. Thanks!

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

No branches or pull requests

2 participants