Flag unused exported names from internal package #6145
Unanswered
ianb-mp
asked this question in
Linter Ideas
Replies: 1 comment
-
|
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Welcome
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 unused 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
Beta Was this translation helpful? Give feedback.
All reactions