[Bug]: Output of `bazel lint //...` is truncated, can't see linters errors in terminal
codrin-lanterne opened this issue · 1 comments
What happened?
When running bazel lint //...
the output of the command seems truncated e.g.
...
Analyzing: 141 targets (0 packages loaded, 0 targets configured)
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
From //lib/aws_utils:aws_utils:
INFO: Analyzed 141 targets (0 packages loaded, 0 targets configured).
[1 / 2] checking cached actions
...
...
In the output above the From //lib/aws_utils:aws_utils
line I believe should be followed by the linting errors produced by linting that target. In practice, it seems like the output is overwritten / hidden. If I check bazel-bin/lib/aws_utils/flake8.aws_utils.aspect_rules_lint.report
I can find the linting error and go and fix it. The issue I found though is that sometimes even the From //path/to/target
line is ommited so it becomes difficult even knowing which targets contain linting errors as you would have to go through all the *.report
files generated by the linting tool and check which ones are empty and which ones are not.
I was wondering, is there any way to stop this truncation from happening and have the bazel lint //...
command have the behaviour where on each run it prints all the linting errors of all targets?
Version
Development (host) and target OS/architectures: Ubuntu 18.04
Output of bazel --version
: aspect 5.9.7
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file: aspect_bazel_lib 1.38.0, aspect_rules_lint 0.12.0
Language(s) and/or frameworks involved: The linting is configured with only flake8 as a linter for Python 3.12
How to reproduce
No response
Any other information?
No response
Found that adding build --color=no
to .bazelrc
fixes this issue. An issue still remains that the output of the bazel lint //,,,
command is quite large as it contains all the bazel build output as well.