Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Regression in aspect lint exit code on lint errors #777

Open
sallustfire opened this issue Nov 20, 2024 · 0 comments
Open

[Bug]: Regression in aspect lint exit code on lint errors #777

sallustfire opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
bug Something isn't working untriaged Requires traige

Comments

@sallustfire
Copy link

What happened?

There is a change in behavior introduced between aspect/5.10.15 and aspect/5.10.14 where unresolved lint errors do not cause the aspect lint command to exit with code 1.

The expected behavior is

$aspect --aspect:interactive=false lint //some/target
Aspect //tools/lint:linters.bzl%stylelint of //some/target:target up-to-date:
  bazel-out/k8-fastbuild/bin/some/target/target.AspectRulesLintStylelint.patch
  bazel-out/k8-fastbuild/bin/some/target/target.AspectRulesLintStylelint.report
  bazel-out/k8-fastbuild/bin/some/target/target.AspectRulesLintStylelint.report.exit_code
INFO: Elapsed time: 0.240s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Lint results for //some/target:target:

/dev/shm/bazel-sandbox.1a614a68dacfa2c8b1a1d1849b65b02f91e493faac9bf43f6f513fd57ca72bbe/linux-sandbox/819/execroot/_main/bazel-out/k8-fastbuild/bin/some/target/styles.css: line 10, col 5, error - Expected "width" to come before "margin-top" in group "Box model" (order/properties-order)

Some problems have automated fixes available:

  some/target/styles.css | 2 +-
  1 file, 1 insertion(+), 1 deletion(-)

$ echo $?
1

Version

Development (host) and target OS/architectures: Pop!_OS 22.04 LTS

Output of bazel --version: 7.3.1

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

Language(s) and/or frameworks involved:

How to reproduce

Starting with aspect/5.10.15, the aspect exit code returns 0 even when there is a lint error from one of the linting aspects.

I confirmed that the relevant `AspectRulesLintStylelint.report.exit_code` file contains the correct error code from the underlying linter.

Any other information?

No response

@sallustfire sallustfire added the bug Something isn't working label Nov 20, 2024
@github-actions github-actions bot added the untriaged Requires traige label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

2 participants