In GitLab by @sobolevn on Dec 22, 2019, 04:54
Almost all linters I use have some kind of caching. It exists in
mypy for Python (and pytest too)
eslint for Javascript
credo for Elixir
rust-clippy for Rust
And only flake8 is missing this feature.
Why is it awesome? Imagine that you have a big project and lots of plugins, even big ones (like https://github.com/wemake-services/wemake-python-styleguide). It takes a LOT of time to run flake8 . on your code. Sometimes I can even ignore it locally and push directly to the CI, hoping that everything is going to be ok.
Another option is to run several changed files only manually. It is not very useful.
You can also rely on external tools like pre-commit or flakehell. Or even IDE. Which is ok, but it is kind of strange. Because looks like this should be a default behaviour. or at least a core feature.
Adding cache will allow users to rerun checks only on changed files, or when plugins are modified, or when the configuration is changed. This will significantly improve the build time.
There's already a working implementation of the caching feature in flake8 wrapper called flakehell. So, we can adapt this approach from there.
PR: life4/flakehell#33
Or come up with something different.
I can work on this during the holiday season.
In GitLab by @sobolevn on Dec 22, 2019, 04:54
Almost all linters I use have some kind of caching. It exists in
mypyfor Python (andpytesttoo)eslintfor Javascriptcredofor Elixirrust-clippyfor RustAnd only
flake8is missing this feature.Why is it awesome? Imagine that you have a big project and lots of plugins, even big ones (like https://github.com/wemake-services/wemake-python-styleguide). It takes a LOT of time to run
flake8 .on your code. Sometimes I can even ignore it locally and push directly to the CI, hoping that everything is going to be ok.Another option is to run several changed files only manually. It is not very useful.
You can also rely on external tools like
pre-commitorflakehell. Or even IDE. Which is ok, but it is kind of strange. Because looks like this should be a default behaviour. or at least a core feature.Adding cache will allow users to rerun checks only on changed files, or when plugins are modified, or when the configuration is changed. This will significantly improve the build time.
There's already a working implementation of the caching feature in
flake8wrapper calledflakehell. So, we can adapt this approach from there.PR: life4/flakehell#33
Or come up with something different.
I can work on this during the holiday season.