-
Notifications
You must be signed in to change notification settings - Fork 369
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
gazelle should exit with non-zero value for syntax errors in BUILD files #1029
Comments
This seems pretty reasonable. Gazelle doesn't have a really well-defined policy on error handling or exit codes. Being unable to parse a build file seems like it should be a hard error though. |
gazelle also does not emit non-zero exit value on other type of errors, like when having errors on running
I am not sure if there is a reliable way, say in a CI step, to tell that if gazelle runs successfully in these cases. |
Just read some gazelle code; it is actually non-trivial to fix. The interfaces gazelle using generally does not return an error. For example: bazel-gazelle/resolve/index.go Line 61 in 41b542f
which where the error is being dropped for go language: bazel-gazelle/language/go/resolve.go Line 96 in 41b542f
And changing the interface would be quite disruptive. One idea to mitigate this can be adding maybe a |
I've created #1214 as a step to make gazelle more vigilant to errors. |
Also found #499 for a similar request. |
What version of gazelle are you using?
v0.22.2
What version of rules_go are you using?
v0.24.7
What version of Bazel are you using?
4.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Mac Intel
What did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: