TomasVotruba / class-leak

Find leaking classes that you never use... and get rid of them.
https://tomasvotruba.com/blog/how-to-avoid-maintaining-classes-you-dont-use
MIT License
75 stars 6 forks source link

global namespaced classes #22

Closed staabm closed 8 months ago

staabm commented 12 months ago

it seems classes which are defined in the global namespace are not found, as the source of truth are the "use" statements, which global classes don't necessarily have

TomasVotruba commented 8 months ago

As I see value in having a global class check, the focus of this package is on a modern code base using at least PSR-4. Checking every name and type could be quite complex and I want to keep this package slim to use and maintain.

Yet, if you find a smart way to detect global classes, feel free to send PR :+1:

Thanks