-
Notifications
You must be signed in to change notification settings - Fork 57
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
Warnings as Errors Request #45
Comments
Can you clarify what you mean by that? Eg is there a specific example you can give? What’s the current warning/error distinction, do you mean syntax errors? |
Hey, So we have been using this app for about 6 months now and we had warnings turn on. We have slowly been removing ALL the warnings and as of today we have finally got rid of them. Lots of these warnings would/could cause massive issues. So from now on we want to enforce warnings as errors. There is options in visual studio to count warnings as errors. That does not work for these projects :\ so it would be nice if we could pass in a command line arg and just treat warnings as errors (but still not include the excluded warnings) |
Warnings vs. errors are decided on in the function count_warnings_errors in format.lua:
If you want a quick fix, you can make this function count everything as an error locally. Longer-term, I don't think an "only errors" mode makes sense, but plausibly luacheck ought to expose a config option for which events are considered errors.
I'm not sure what you mean by this, but this feels like a separate bug in whatever glue project you are using to link luacheck to visual studio? |
@JayMales What difference does it make to you? Ore you just looking for the exit code or are you parsing the output to read whether it is a warning or error? |
At least in my case, it's whichever one of those that GitHub Actions uses to determine whether the workflow failed or not. |
Could I request a command line arg that would treat warnings as errors.
This would be great!
Thanks
The text was updated successfully, but these errors were encountered: