aspect-build / aspect-build/rules_lint

[Bug]: Incorrect suggestion to fix format

Open
#482 3 comments 1 reaction 1 assignee Claimed by @alexeagle View on GitHub
bug
Dominant language
Starlark
Stars
154
Forks
125
Avg merge
3d 21h
Merged PRs (30d)
20

Description

### What happened?

The suggested output of format check is the same as the format command.

I have 2 targets:

```
format_multirun(
name = "format.fix",
python = "@aspect_rules_lint//format:ruff",
```
and
```
format_test(
name = "format.check",
python = "@aspect_rules_lint//format:ruff",
```

The resulting targets are:

```
# Current targets
//tools/format:BUILD
//tools/format:format.check
//tools/format:format.check_Python_with_ruff
//tools/format:format.fix
//tools/format:format.fix.check
//tools/format:format.fix_Python_with_ruff
//tools/format:format.fix_Python_with_ruff.check
```

When I run: `bazel run //tools/format:format.check_Python_with_ruff` I get as suggestion the same command(check) instead of fix command:
```
FAILED: A formatter tool exited with code 123
Try running 'bazel run //tools/format:format.check_Python_with_ruff ' to fix this.
```

### Version

Development (host) and target OS/architectures: Ubuntu 24.04

Output of `bazel --version`: bazel 7.4.0

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file: bazel_dep(name = "aspect_rules_lint", version = "1.0.3")

Language(s) and/or frameworks involved: python

### How to reproduce

```shell
For 2 targets defined:

format_multirun(
name = "format.fix",
python = "@aspect_rules_lint//format:ruff",

and

format_test(
name = "format.check",
python = "@aspect_rules_lint//format:ruff",

Run:
`bazel run //tools/format:format.check_Python_with_ruff`

Observed output:

FAILED: A formatter tool exited with code 123
Try running 'bazel run //tools/format:format.check_Python_with_ruff ' to fix this.

Expected output:

FAILED: A formatter tool exited with code 123
Try running 'bazel run //tools/format:format.fix_Python_with_ruff ' to fix this.
```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.