What are the thoughts on doing `autoflake` as a p...
# plugins
c
What are the thoughts on doing
autoflake
as a plugin?
h
Oh that’d be neat! You’d be adding a formatter, as it rewrites files. When you add a formatter, you end up implementing both
fmt
and
lint
. Check out https://www.pantsbuild.org/docs/plugins-fmt-goal for a guide on how to do this, along with an example of adding Shfmt. The Black/Isort/Docformatter implementations are also likely instructive; in fact, you could copy and paste ~85% of that code We’d be happy to help out if you’re interested in trying it out
c
Thanks!