Skip to content
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

Unused methods #912

Open
movedoa opened this issue Sep 28, 2021 · 3 comments
Open

Unused methods #912

movedoa opened this issue Sep 28, 2021 · 3 comments

Comments

@movedoa
Copy link

movedoa commented Sep 28, 2021

Pretty sure i already created a ticket for this some time ago but i can't find it anywhere.

Anyway, i just spent 30 minutes refactoring a method, which, as is turns out, is used nowhere and could be removed.
A rule to find unused methods would be great to find dead code.

Not sure if its that easy for procedures/functions but i care mostly about methods so i would be happy with that ;-)

@PeterJudgeZA
Copy link

It's tough, though, with public or package-* access level members. Especially if you develop libraries / frameworks. Might be good to (be able to) limit this to private/protected members.

@gquerret gquerret changed the title Rule idea: Unused methods Unused methods Sep 28, 2021
@gquerret
Copy link
Contributor

The best would be to have a "Where used" functionality in the IDE ! But that's a good rule idea too.
As Peter said, can be done for private methods. Doing that on public methods would require changes to the engine.

@movedoa
Copy link
Author

movedoa commented Sep 28, 2021

The best would be to have a "Where used" functionality in the IDE ! But that's a good rule idea too.
As Peter said, can be done for private methods. Doing that on public methods would require changes to the engine.

....yeah, an ide from the 21 century would be nice 😬

Public methods would still be nice to have (with a setting). Maybe something for the future 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants