Skip to content

Commit bd84802

Browse files
redsun82Copilot
andcommitted
Just: stop hiding the warnings buildifier could not fix
The drop pattern matched any tally, so a file left with warnings was as silent as one left clean. Nothing else reports them: buildifier prints no detail in fix mode and exits 0 either way, so that line is the only notice. Only the empty tally is noise, and it is printed for every file whether or not it was touched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent f19fd7d commit bd84802

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

misc/just/format.just

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ _bazel_names := "BUILD,WORKSPACE,*.bazel,*.bzl,*.sky"
2828

2929
_bazel_excluded := ".git/*,*/.git/*,*misc/bazel/3rdparty/*_deps/*"
3030

31-
# buildifier only names what it rewrote if it also accounts for every file it did not.
32-
_bazel_accounting := ': applied fixes, [0-9]+ warnings left$'
31+
# `-v` accounts for every file, so the empty tally is dropped. A non-zero one is kept: it is
32+
# the only notice of warnings buildifier could not fix, as the exit code stays 0 regardless.
33+
_bazel_accounting := ': applied fixes, 0 warnings left$'
3334

3435
# These formatters take files rather than directories, so `run_on_files.py` collects them
3536
# and passes them positionally, which is what lets paths contain spaces. `codeql query

0 commit comments

Comments
 (0)