Meta issue: plugin system
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. 1. Explicit "opt-in" for plugins. Right now `flake8` suffers from a problem when you install some tool and it has a `flake8` plugin definition. This plugin is automatically enabled due to how `setuptools` hooks work. I think that all rules must be explicit. So, `eslint`'s explicit `plugins:` looks like a better way. 2. Special "fix" API and tooling: so many typical problems can be solved easily by plugin authors 3. 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? 4. Plugin configuration: current way of configuring everything in `[flake8]` section can cause conflicts between plugins. Probably, the way `eslint` does that is better 5. Packaging: how to buld and package rust extensions? How to build wheels? Please, share your ideas and concerns.
Posted by sobolevn on Sep 29, 2022, 9:42 AM
Tags
Related issues
Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments
onboarding (E-commerce)
Some other ones to add on from my fresh install: Start menu search will search the Microsoft Store for apps they want you to install, som...
New Release?
【Not An Issue But Tutorial】A complete tutorial of pre-processing steps
Meta issue: plugin system
Meta issue: plugin system
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. 1. Explicit "opt-in" for plugins. Right now `flake8` suffers from a problem when you install some tool and it has a `flake8` plugin definition. This plugin is automatically enabled due to how `setuptools` hooks work. I think that all rules must be explicit. So, `eslint`'s explicit `plugins:` looks like a better way. 2. Special "fix" API and tooling: so many typical problems can be solved easily by plugin authors 3. 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? 4. Plugin configuration: current way of configuring everything in `[flake8]` section can cause conflicts between plugins. Probably, the way `eslint` does that is better 5. Packaging: how to buld and package rust extensions? How to build wheels? Please, share your ideas and concerns.
Comments (0)
No comments yet. Start the discussion.