-
Notifications
You must be signed in to change notification settings - Fork 226
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
--warn-as-error
prevents next stage from running if it finds any warning
#2972
Comments
If you run tsp compile . --warn-as-error, which we do in CI, and your spec has compiler warnings (think onValidate) as well as rule violations, the conpiler will stop, only emit the compiler warnings, fail, and exit without actually running the rules. This is manifesting on CI where the compile step exits due to a deprecation warning and thus doesn't run the actual linter rules. --warn-as-error should collect all diagnostics, from the program AND rules, and only then apply --warn-as-error |
Also, in discussion with @timotheeguerin, |
There is a few options:
|
I'd vote for 3. |
est: 2 for implementing the second option |
--warn-as-error
prevents next stage from running if it fins any warning--warn-as-error
prevents next stage from running if it finds any warning
The compiler will not move to the next stage if it finds an error. However when we use
--warn-as-error
this update the diagnostic to be an error immediately at report type not when displaying it at the end.This is makes the
--warn-as-error
have a worse experience as it can't keep going if some minor elements that shouldn't prevent the next stage from running were found.The text was updated successfully, but these errors were encountered: