Kampfkarren / selene

A blazing-fast modern Lua linter written in Rust
https://kampfkarren.github.io/selene/
Mozilla Public License 2.0
609 stars 78 forks source link

Add unused type lint #423

Open LastTalon opened 2 years ago

LastTalon commented 2 years ago

Right now you can define an non-exported type like type MyType = string | number, fail to use it, and selene will ignore this. It would be useful if a type going unused would be linted as an unused type, since failing to use the type anywhere is likely a mistake.

Kampfkarren commented 2 years ago

Does type scoping work the same way as variables do? If so should be some elbow grease, but fairly straight forward, to add support for this in the scope manager.