I find the ex_unit `--warnings-as-errors` option a useful validation step. However, when developing tests it's not uncommon for me to have made unimportant changes in my code that cause warnings (for example, commenting out a block, causing some aliases to become unused). This prevents the tests from even running because ExUnit bails out before running tests when warnings are present. It's easy enough for me to fix the warnings but it's an extra step I'd love to eliminate if possible.
My proposal is, when `--warnings-as-errors` is enabled: 1. Print warnings etc before the tests are run (same as today) 2. Run the tests regardless of there being warnings or not. 3. Fail with non-zero exit code if warnings present or tests failed. In the case of warnings, use the same helpful message that is printed today. My hope is that this will help with developer workflow and allow more users to enable the `--warnings-as-errors` option, perhaps with minor adaptation: ``` Compilation failed due to warnings while using the --warnings-as-errors option ``` becomes (something like)... ``` Test run failed due to presence of warnings during compilation while using the --warnings-as-errors option ``` -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/bfa88066-24c9-4f31-ae4f-45cc14f48261n%40googlegroups.com.