Skip to content

Statistics output doesn't show [*] markers for partially-fixable error types #20921

@tsvikas

Description

@tsvikas

Description

When using --statistics, the summary line correctly reports the number of fixable errors, but individual error type lines don't show the fixable marker ([*]) when some instances of that error type are fixable.

Reproduction

Run the following command on the karpathy/nanochat repository (tested using branch master, which was on commit 4346536):

❯ ruff check --select ANN --statistics --unsafe-fixes
326     ANN001  missing-type-function-argument
182     ANN201  missing-return-type-undocumented-public-function
 33     ANN204  missing-return-type-special-method
 22     ANN003  missing-type-kwargs
 15     ANN202  missing-return-type-private-function
 12     ANN002  missing-type-args
  7     ANN206  missing-return-type-class-method
Found 597 errors.
[*] 80 fixable with the --fix option.

❯ ruff check --select ANN --statistics --unsafe-fixes --fix
326     ANN001  missing-type-function-argument
137     ANN201  missing-return-type-undocumented-public-function
 22     ANN003  missing-type-kwargs
 12     ANN002  missing-type-args
  9     ANN202  missing-return-type-private-function
  7     ANN206  missing-return-type-class-method
  4     ANN204  missing-return-type-special-method
Found 597 errors (80 fixed, 517 remaining).

Current behavior

Output shows no marker for which of the errors are fixable :

Expected behavior

Error type lines should indicate fixability:

  • [*] when all instances are fixable
  • [~] (or similar symbol) when only some instances are fixable

Alternatively, a new column with the count of fixable issues.

This would clearly communicate that fixes are available for this error type, while distinguishing partial from full fixability.

Version

ruff 0.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to the command-line interface

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions