Skip to content

Add easier way to gather all available rules from ruff #9891

@qarmin

Description

@qarmin

Since 0.2.0 version, my fuzzer CI stopped working.

In CI, first I start to search for broken files, minimize sample size and at the end minimize number of rules, that are needed to produce problem.

Minimization of rules is done via this steps:

  • getting all rules from ruff - this is done via ruff rule --all command and manually parsing all rules in ()
  • splitting available rules by half and checking if ruff still produce error
  • repeating until found minimal amount of rules

0.2.0 version removed rule PLR1706 which is still available in ruff rule --all with section ## Removal and ruff started to fail each time with message

ruff failed
  Cause: Rule `PLR1706` was removed and cannot be selected.

At least for now I can modify a little rule parser, but probably this will be more problematic in future.

So maybe ruff could produce simple list of rules(enabled/removed etc.) like AN001,AN002 or export them to json file via rull rule --export a.json or ruff rule --available-simple?

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to the command-line interfacequestionAsking for support or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions