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
88 stars 7 forks source link

Support skipping class and method attributes #33

Closed ruudk closed 7 months ago

ruudk commented 7 months ago

This makes it possible to skip classes that are tagged with a specific attribute.

It also makes it possible to skip methods that have a certain attribute. This is useful, because sometimes attributes are only defined on the methods.

Fixes #10

ruudk commented 7 months ago

@TomasVotruba Could you approve workflow so that I can see if the CI passes?

TomasVotruba commented 7 months ago

This looks very good :+1:

ruudk commented 7 months ago

I'm fixing some minor things... :)

ruudk commented 7 months ago

@TomasVotruba Could you approve again (or enable this by default)?

Also, what's the best way to test the full build? When I run full build it overwrites my directory, and I have to revert it every time I want to make changes.

Or is there a way to generate a PHAR or something like that?

TomasVotruba commented 7 months ago

@TomasVotruba Could you approve again (or enable this by default)?

I think this is one of Github DX features that can't be disabled :sweat_smile: I recommend running PHPStan locally to get feedback fast:

vendor/bin/phpstan
TomasVotruba commented 7 months ago

For Rector, just run:

composer rector

And commit changes. Should be good to go :+1:

ruudk commented 7 months ago

Should be good now.

ruudk commented 7 months ago

Ready for review.

ruudk commented 7 months ago

Fixed the typo, should be good now.

ruudk commented 7 months ago

@TomasVotruba If there's anything you want me to change or improve please let me know 🙏

TomasVotruba commented 7 months ago

Looks good, thank you :pray:

Once accepted, for next PRs the CI will be triggered automatically for you (again, Github defaults :))

ruudk commented 7 months ago

Thanks!! 🎉

Would be great if you could tag it.

TomasVotruba commented 7 months ago

I'll get to it this week, as I see more PRs are coming :+1: