You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now Linting is meant to be used purely as a code review tool - it’s meant to be run during CI and present the findings as PR comments
Describe the feature
I propose adding the ability to specify if linting issues should also be raised as warnings or errors during normal bazel builds.
Proposed approach is to modify the aspect cli so that it looks for optional tags in each build target (tag = “lint-as-warning” or “lint-as-errors”) and then:
for warnings, it would print linting issues to stdout during the build, so that they are clearly visible by the user as you’re building locally
for errors, the same happens, but linting errors also fail the build
We could also add a generic config option to the .aspect/cli/config.yaml so that user can set their own global defaults, in case you don’t want to change every target
Do you think such a feature makes sense?
I understand the philosophy of having linting be independent on the build, but sometimes you do want to enforce linting rules (most notably, nextJS does that by default) and this seems like a relatively clean way of integrating linting issues into the workflow.
Let me know what you think!
The text was updated successfully, but these errors were encountered:
antspy
changed the title
[FR]: add optional tags that result in warning / errors
[FR]: add optional tags that result in warning / errors for linting issues
Feb 14, 2025
antspy
changed the title
[FR]: add optional tags that result in warning / errors for linting issues
[FR]: add optional tags that result in warning / errors for linting issues during normal builds
Feb 14, 2025
Ah that looks really cool, thanks a lot! I had indeed missed it :)
Is there a way to do the same, but enabling them as warning? e.g. messages displayed (in yellow) during bazel build, which do not fail the build, but keep you aware of the linting issues?
Also, there might be some value in specifying per-target config (e.g. I only want lint issues to fail this target, but all of them by default, or something like that).
In any case, this looks really cool, thank you! Will use that for now :)
What is the current behavior?
Right now Linting is meant to be used purely as a code review tool - it’s meant to be run during CI and present the findings as PR comments
Describe the feature
I propose adding the ability to specify if linting issues should also be raised as warnings or errors during normal bazel builds.
Proposed approach is to modify the aspect cli so that it looks for optional tags in each build target (tag = “lint-as-warning” or “lint-as-errors”) and then:
We could also add a generic config option to the .aspect/cli/config.yaml so that user can set their own global defaults, in case you don’t want to change every target
Do you think such a feature makes sense?
I understand the philosophy of having linting be independent on the build, but sometimes you do want to enforce linting rules (most notably, nextJS does that by default) and this seems like a relatively clean way of integrating linting issues into the workflow.
Let me know what you think!
The text was updated successfully, but these errors were encountered: