Meta issue: plugin system
Author: sobolevnCreated Sep 29, 2022Updated Sep 26, 2026
Labelscore
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
flake8suffers from a problem when you install some tool and it has aflake8plugin definition. This plugin is automatically enabled due to howsetuptoolshooks 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 wayeslintdoes that is better - Packaging: how to buld and package rust extensions? How to build wheels?
Please, share your ideas and concerns.
Source: astral-sh/ruff