Skip to content

Show-settings does not show correct settings file #22475

@olbermann

Description

@olbermann

Summary

I have a main directory maindir with a pyproject.toml containing one ruff configuration, and a subdirectory subdir with another pyproject.toml containing ruff configuration as well as an example.py file.
When I run, from the main directory, the command:
ruff check subdir/example.py --show-settings,
in line 2 of the output, it says
Settings path: maindir/pyproject.toml
But (e.g also when removing the --show-settings option) it uses the ruff config from maindir/subdir/pyproject.toml, so I would have expected it to show me this as
Settings path: maindir/subdir/pyproject.toml

Version

ruff 0.14.11

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