Skip to content

[FR]: Allow using a Ruff config that is not in the discovery path #852

Description

@m-pilia

What is the current behavior?

Hi! If the Ruff config is not in the discovery path, it is ignored by Ruff.

E.g. with a file structure like

config
 |- BUILD.bazel
 |- pyproject.yaml
src
 |- BUILD.bazel
 |- hello.py

it is possible to create the aspect as

ruff = lint_ruff_aspect(
    binary = Label("@aspect_rules_lint//lint:ruff_bin",
    configs = [Label("//config:pyproject.yaml")],
)

but the pyproject.yaml file will not be discovered by Ruff, and any Ruff configuration in it will be effectively ignored.

Describe the feature

Would be nice to have a way to specify a config file that will be propagated to ruff (via the --config argument taken by the ruff binary).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions