Formatters make errors output nice. Available formatters:
colored
-- for humans.gitlab
-- Gitlab CI Code Quality artifact.grouped
-- also colored, but all messages are explicitly grouped by file.json
-- no colors, only one json-dict per line for every error.stat
-- show errors count for every code, grouped by plugins.default
-- classic Flake8 formatter. Booooring.
Also, you can specify show_source = true
in the config to show line of source code where error occurred with syntax highlighting.
[tool.flakeheaven]
format = "colored"
[tool.flakeheaven]
format = "colored"
show_source = true
[tool.flakeheaven]
format = "grouped"
[tool.flakeheaven]
format = "grouped"
show_source = true
[tool.flakeheaven]
format = "stat"
[tool.flakeheaven]
format = "json"
Output Code Quality artifact compatible with Gitlab CI.
[tool.flakeheaven]
format = "gitlab"
An example of Gitlab CI job (.gitlab-ci.yml
):
flakeheaven:
image: python:3.7
script:
- pip3 install flakeheaven
- flakeheaven lint --format=gitlab --output-file flakeheaven.json
artifacts:
reports:
codequality: flakeheaven.json