-
Notifications
You must be signed in to change notification settings - Fork 157
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
Enhancement: Making vulture a flake8 plugin #161
Comments
Hi @pykong, This seems like a really nice idea, Thanks! Let's see what @jendrikseipp has to say about this and in the end if we decide to get on with it, I think that I would be up for development as I shall be available for a month or so during late August. |
I agree, that's a nice idea! @RJ722, it would be great if you found the time to work on this! I think https://github.com/PyCQA/flake8-docstrings should serve as a good example. |
@RJ722 @jendrikseipp Great to see your enthusiasm. Keep in mind |
@RJ722 Happy to look into the issue. I would be making contact for contextual info. |
Perfect, please coordinate with @RJ722. |
Hi everyone, I tried taking a stab at it yesterday (Merry Christmas to you too! :D) - But, it turns out that because of the way flake8 plugin works, a new instance of the plugin class is created for every new file, and it receives the filename/AST of only that file - due to which it isn't directly possible to report code used across different files. Off the top of my head, I can think of two possible workarounds:
Did I miss something? Is there anything else we can do? Also, I decided to call it |
@RJ722 Thanks for putting up the effort. |
@pykong I agree. thanks for your input! |
Thanks for looking into this! Regarding the functionality, I think it's best to ask the flake8 devs how best to accumulate results over multiple files. Regarding the name, I agree that flake8-vulture sounds best. |
Thanks @jendrikseipp! I've opened https://gitlab.com/pycqa/flake8/issues/603 |
@RJ722 the maintainer of flake8 over there at GitLab does not seems to be too keen on Now we have to see whether it can actually be made to work. Technically it seems flake8 does not offer the functionality we require to do so judged from aso's response on GitLab. That would be sad though. |
I believe
vulture
would make a useful addition to the flake8 plugin ecosystem, as finding dead code as part of the usual lining process would be great.information on flake8 plugin development:
https://flake8.pycqa.org/en/latest/plugin-development/
The text was updated successfully, but these errors were encountered: