-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add Lint/UnusedGenericOrUnion
#537
base: master
Are you sure you want to change the base?
Add Lint/UnusedGenericOrUnion
#537
Conversation
|
Lint/UnusedPathGenericOrUnion
Lint/UnusedTypeOrConstant
I'd reconsider the original name. This rule is about references to types, i.e. a path. The term Also I'm not sure it makes sense to include paths to constants because they actually have the side effect of initializing the constant's value. |
There's no way to differentiate paths that point to class names vs constants without semantic analysis, so we'll need to drop support for paths in general then. I'll rename to |
1bdfbc9
to
bb1ef05
Compare
Lint/UnusedTypeOrConstant
Lint/GenericOrUnion
Lint/GenericOrUnion
Lint/UnusedGenericOrUnion
These are the only other nodes allowed in type unions (excluding "self?", as it can point to a method)
Similar to
Lint/UnusedLiteral
andLint/UnusedComparison
. Not too fond of the name so any suggestions are welcome.