-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
lint: Enable interfacer #2367
lint: Enable interfacer #2367
Conversation
@@ -11,6 +11,7 @@ linters: | |||
- gosimple | |||
- govet | |||
- ineffassign | |||
- interfacer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/mvdan/interfacer appears to be archived. should we find a currently maintained version of this? is the archived version still considered the recommended one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah... we're limited to what golangci-lint
provides. in some cases they maintain their own forks:
https://github.com/golangci/golangci-lint/blob/master/go.mod#L13-L29
...and in other cases they depend directly on other linters:
https://github.com/golangci/golangci-lint/blob/master/go.mod#L57
i think it's a worthwhile trade-off to defer to golangci-lint
on linter selection, as it's fairly well-supported as a whole, and also quite fast compared to running each linter separately.
247bc55
to
3fc0894
Compare
interfacer suggests narrower interface types: https://github.com/mvdan/interfacer Part of #217 Signed-off-by: Andrew Seigner <siggy@buoyant.io>
3fc0894
to
d7d3c99
Compare
Sometimes even if a type is more specific than necessary, it seems to me it can give more clarity, and even more type safety. Like with |
@alpeb I had the same thoughts! esp regarding |
@alpeb @rmars This all sounds reasonable. I think for a lot of these linters, there are tradeoffs where the linter requires slightly less-intuitive code at the benefit (hopefully) of easier code review. After reading your comments, I agree the linter benefits do not outweigh the code changes required. I'll close this one. Thanks for the thoughtful feedback! |
interfacer suggests narrower interface types:
https://github.com/mvdan/interfacer
Part of #217
Signed-off-by: Andrew Seigner siggy@buoyant.io