Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
asottile opened this issue Nov 14, 2021 · 0 comments

Comments

@asottile
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant