Fix --warnings-as-errors not catching misnamed test file warnings#15194
Merged
josevalim merged 5 commits intoelixir-lang:mainfrom Mar 16, 2026
Merged
Conversation
Cover two scenarios where misnamed test file warnings are not properly handled by --warnings-as-errors: - When tests fail, the exit status should be bumped by 1 - When no tests match (noop path), the abort message should be shown
Two cases were not properly handled: - When tests fail, the exit status was not bumped by 1 for misnamed file warnings (warn_files was missing from the condition) - When no tests match the load filters (noop path), the warnings-as-errors check was skipped entirely Closes elixir-lang#15105
Member
|
I believe the idea is that, if tests fail, that status code will have higher priority. |
… file warnings Remove the warn_files check from the failures > 0 branch and its corresponding test, keeping only the noop path fix.
Contributor
Author
|
Makes sense, updated. Test failure exit status now takes priority. The fix only covers the noop path (when no test files match the load filters). |
josevalim
reviewed
Mar 16, 2026
josevalim
reviewed
Mar 16, 2026
Co-authored-by: José Valim <jose.valim@gmail.com>
Member
|
💚 💙 💜 💛 ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two cases where misnamed test file warnings were not properly handled by
--warnings-as-errors:warn_fileswas missing from the condition on thefailures > 0branch)--warnings-as-errorscheck was skipped entirelyCloses #15105