Flag unused exported names from internal package
Closed this issue · 1 comments
ianb-mp commented
Welcome
- Yes, I've searched similar issues on GitHub and didn't find any.
- I agree to follow this project's Code of Conduct
How did you install golangci-lint?
go install
Your feature request related to a problem? Please describe
It would be good to flag names (var, const etc) that are exported from an internal package (i.e. reside under internal/) that are unused.
I understand that it's not possible to know whether an exported name is used outside a regular package, but in the case where the package is under internal/, given the special meaning of that directory, it seems that this should be checked.
Describe the solution you'd like
linter should flag unused, exported names in packages that reside under internal/.
Describe alternatives you've considered
I tried the deadcode utility but it doesn't handle this either.
Additional context
No response
Supporter
- I am a sponsor through GitHub or OpenCollective
boring-cyborg commented
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.