ruff icon indicating copy to clipboard operation
ruff copied to clipboard

feat: add ruff --statistics

Open spaceone opened this issue 2 years ago • 6 comments

Issue #1814

spaceone avatar Jan 28 '23 01:01 spaceone

@charliermarsh some off topic questions:

  • ruff is released once a day (if there were changes)? this is done automatically?
  • who are the maintainers - only you or is there a team already?

spaceone avatar Jan 28 '23 11:01 spaceone

We don't have an auto-release setup. Ruff releases only happen when Charlie decides to make a release, see also https://github.com/charliermarsh/ruff/pull/2288#issuecomment-1407277090. Afaik Charlie is the only maintainer but he has been working on ruff full-time.

not-my-profile avatar Jan 28 '23 11:01 not-my-profile

@spaceone - That's right -- I cut a release about once a day, but it's done manually by me. (Mostly just consists of bumping the version via commit, creating a release in GitHub, and ensuring that the GitHub Action does its job.)

I'm working on Ruff full-time. But we have a lot of contributors who are doing heavy lifting :)

charliermarsh avatar Jan 29 '23 01:01 charliermarsh

This looks good, and I'll merge it as-is. But am I crazy to think that with --statistics, we should just show the statistics, and not the individual error codes? I know Flake8 shows both, but I was surprised by it, and it makes it much harder to pipe into other Unix tools (e.g., to sort the table).

charliermarsh avatar Jan 29 '23 03:01 charliermarsh

(That would also resolve your question about the two JSON items.)

charliermarsh avatar Jan 29 '23 03:01 charliermarsh

OK: I adjusted the branch to shows statistics only and not the individual errors.

spaceone avatar Jan 29 '23 08:01 spaceone

Will you update the Readme to mention the use of this option?

JonathanPlasse avatar Jan 29 '23 18:01 JonathanPlasse

@JonathanPlasse - Yeah we should probably change the --help in the README to use run check --help instead. Would that resolve it?

charliermarsh avatar Jan 29 '23 18:01 charliermarsh

I think so yes.

JonathanPlasse avatar Jan 29 '23 19:01 JonathanPlasse