Check for and skip generated files
Opened this issue · 1 comments
ericcornelissen commented
Feature Request
This is a feature request for:
- goparamcount
- goreturncount
- a new tool
Description
It does not always make sense to check things enforced by the tools of this project on generated files. As such, support should be added to at least ignore generated files conditionally.
Example
none
Proposal
Leverage dmitri.shuralyov.com/go/generated to implement this.
As of writing this it's unclear whether the default should be to ignore generated files or not. In case of the former, whether or not to provide a CLI flag to disable ignoring generated files.
ericcornelissen commented
Builtin to the go/ast
package (since go1.21): https://pkg.go.dev/go/ast#IsGenerated