Split the Package comment from the "boilerplate" comments
dlsniper opened this issue · 1 comments
dlsniper commented
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
- Run
mockgen -destination demo/mock.go -package demo . Demoer
on any interface/package - 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.