aspect-build / aspect-build/rules_lint

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

Open
#852 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Starlark
Stars
154
Forks
125
Avg merge
3d 21h
Merged PRs (30d)
20

Description

### 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).

Contributor guide

Open the contributing guide

Research direction

Start at the lint_ruff_aspect entry point and its configs attribute, then trace how config/pyproject.yaml and hello.py are passed to the Ruff binary. Verify the shown layout with a configuration outside Ruff’s discovery path; done means the supplied config is honored through Ruff’s --config argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.