Open
Description
I think that the main thing why Flake8 is so popular is its plugin system.
You can find plugins for every possible type of problems and tools.
Right now docs state:
Beyond rule-set parity, ruff suffers from the following limitations vis-à-vis Flake8:
1. Flake8 has a plugin architecture and supports writing custom lint rules.
I propose designing and implementing plugin API.
This way ruff
can compete with flake8
in terms of adoption and usability.
Plugin API
I think that there are some flake8 problems that should be fixed and also there are some unique chalenges that should be addressed.
- Explicit "opt-in" for plugins. Right now
flake8
suffers from a problem when you install some tool and it has aflake8
plugin definition. This plugin is automatically enabled due to howsetuptools
hooks work. I think that all rules must be explicit. So,eslint
's explicitplugins:
looks like a better way. - Special "fix" API and tooling: so many typical problems can be solved easily by plugin authors
- Plugin order. Since plugins will change the source code, we must be very strict about what order they run in. Do they run in parallel while checking files?
- Plugin configuration: current way of configuring everything in
[flake8]
section can cause conflicts between plugins. Probably, the wayeslint
does that is better - Packaging: how to buld and package rust extensions? How to build wheels?
Please, share your ideas and concerns.