flake8 icon indicating copy to clipboard operation
flake8 copied to clipboard

`--benchmark` / `--statistics` don't play well with custom formatters or `--quiet`

Open asottile opened this issue 4 years ago • 0 comments

while moving things around, I noticed that these options don't play nicely with formatters

for example:

$ flake8 --quiet --quiet t.py --statistics
1     F401 'os' imported but unused
$ flake8 --format=json --benchmark t.py; echo
{"t.py": [{"code": "F401", "filename": "t.py", "line_number": 1, "column_number": 1, "text": "'os' imported but unused", "physical_line": "import os\n"}]0.00914    seconds elapsed1          total logical lines processed109        logical lines processed per second1          total physical lines processed109        physical lines processed per second3          total tokens processed328        tokens processed per second1          total files processed109        files processed per second}

I think ideally the following happens: statistics / benchmarks are moved from the base formatter to the default formatter and are noops otherwise

perhaps even removing statistics / benchmark if they're not deemed useful enough

asottile avatar Nov 14 '21 19:11 asottile