Skip to content

Please allow to address rules by names instead of codes, too #15315

Closed as duplicate

Description

@fraunhofersociety

Hello,
could you please support addressing warnings by rule names instead of rule codes?
That would make my code more readable for humans.

A. For example I would like to use

# noqa: some-rule-name

instead of

# noqa: XY123

B. Similarly, in the configuration file, I would prefer names over codes, too:

[tool.ruff]
target-version = "py312"
select = ["ALL"]
ignore = [
    "some-rule-name",  
]

C. Please also include rule names in the output of ruff.

Related:

#3442

https://docs.astral.sh/ruff/rules

Activity

  1. MichaReiser commented on Jan 7, 2025

    @MichaReiser
    Member

    Thanks. This is something we will consider supporting in the future, but it's not yet decided if as part of now or as a ruff-specific suppression comment, e.g., ruff: ignore[name].

    We plan on tackling this as part of #1773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions