bazel-contrib / bazel-contrib/buildtools
[buildifier] Add `--mode=off` to allow to run just looking for lints (and their fixes)
Open
Nobody has claimed this yet.
P3
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 470
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 13
Description
👋 Howdy!
Title says most of it, but Buildifier has an unfortunate CLI where I can't break up its operations into formatting/fixing
# I can get it to just complain about formatting
buildifier -mode=check -lint=off
buildifier -mode=diff -lint=off
# I can get it to just fix formatting
buildifier -mode=fix -lint=off
# I can get it to complain about formatting _and_ lints
buildifier -mode=check -lint=warn
# I can also get it to fix formatting and fixing
buildifier -mode=fix -lint=fix
# But I can't get it to just focus on lints
buildifier -mode=off -lint=fix
buildifier -mode=off -lint=warn
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Buildifier CLI handling for the -mode and -lint options, using the command examples in the issue to trace their interaction. Verify the behavior for -mode=off with both -lint=warn and -lint=fix: lint findings or fixes should run without formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100