Skip to content

Support baselines, i.e., ignore existing errors for incremental adoption #1149

Description

@edgarrmondragon

Baselines would allow developers to introduce Ruff to their codebase incrementally by ignoring existing errors and address them as they reappear when making changes to the code.

Supported by some tools in the flake8 ecosystem:

A very basic proposal for this in ruff:

In the CLI

ruff . --exit-zero --format baseline > .ruff_baseline
ruff . --baseline .ruff_baseline  # doesn't report any errors

In pyproject.toml

[tool.ruff]
baseline = ".ruff_baseline"

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelated to core functionalitysuppressionRelated to supression of violations e.g. noqa

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions