aspect-build / aspect-build/rules_lint

[Bug]: Format scripts hiding errors when using grep from busybox

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

Description

### What happened?

`format.sh` uses `grep -vFxf <(git ls-files --deleted)` to exclude deleted files from the formatter input. When `git ls-files --deleted` returns nothing (normal for a clean checkout), the pattern file is empty. BusyBox `grep -vFxf ` with an empty pattern file exits 1 and produces no output, where GNU grep passes all lines through. The `|| true` swallows the exit code but not the lost output, leaving files="" for every language — so no formatter ever runs.

### Version

Development (host) and target OS/architectures:

Output of `bazel --version`:

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:

Language(s) and/or frameworks involved:

### How to reproduce

```shell

```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in format.sh and inspect the grep -vFxf process substitution that filters git ls-files --deleted. Reproduce it with BusyBox grep on a clean checkout, then verify that formatter input still includes all relevant files and that formatters run normally when the deleted-file list is empty.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.