bazel-contrib / bazel-contrib/buildtools
[buildifier] Warn (and exit nonzero) if `--lint=fix` and there are unfixable lints
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 470
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 13
Description
Unfortunately, because `-lint=fix` exits zero (even if there are unfixable errors), that means I don't have any confidence that `-lint=fix` doesn't require a subsequent `-lint=warn` (which means I'm having to run `buildifier` twice.
Ideally, `-lint=fix` would:
- Fix fixable lints
- Warn/exit nonzero the non-fixable ones
(Alternatively could be a new `lint` value like `fix-and-warn`)
Contributor guide
Research direction
Start by locating buildifier's handling of the --lint=fix option and its existing lint-related tests. Run those tests to understand current exit behavior; done means fixable lints are corrected while unfixable lints are reported and cause a nonzero exit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100