flakeheaven is a legacy-first
flake8 linter to make it awesome.
What does it mean? It means, that it adds some useful
features to the core
flake8 with the new command line utility:
pip install flakeheaven # however we recommend to use `poetry`
Then you will have to configure
flakeheaven inside your
You can run
flakeheaven pluginsto see what plugins are you missing and configure it properly
Or you can use our preset as
baseconfiguration like so:
[tool.flakeheaven] # optionally inherit from remote config (or local if you want) base = "https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/flakeheaven.toml"
flakeheaven lint # accepts the same arguments, does the same as `flake8`
The most exciting feature for us is
When you project is old you cannot just install and use a new linter. Since your codebase will contain hundreds or even thousands of violations.
Some of them can be auto-formatted, some of them can be silenced. But, what if there are still too many of them to fix right here and right now?
Let me introduce the
The first step is to create a
flakeheaven baseline > .flakeheaven_baseline
It will contain all your current violations list with exact locations and quantity.
Then specify the
baselinein the configuration:
# Inside your pyproject.toml [tool.flakeheaven] baseline = ".flakeheaven_baseline"
Run your linter again with
flakeheaven lint. You will see no violations!
Try to add a new one into your source code. And run your linter again. It will be reported!
baseline method allows you to report any new violations
and fix the old ones little by little.
So, the integration is almost painless.
That’s why we call it “legacy-first”. Enjoy your new linter in your old project!
flakeheaven is officially supported by
and developed by the same people.
Our legacy guide
Official docs: flakeheaven.readthedocs.io