uber-go / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
2.12k stars 109 forks source link

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

Closed dlsniper closed 11 months ago

dlsniper commented 11 months ago

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

Triage Notes for the Maintainers

Here's an attempt at fixing the issue: https://github.com/uber-go/mock/pull/112.

JacobOaks commented 11 months ago

Closing since https://github.com/uber-go/mock/pull/112 was merged. Thanks!