hauleth / hauleth/mix_machine

Unable to use --warnings-as-errors to fail CI on compilation warnings

Open
#16 0 comments 0 reactions 1 assignee Claimed by @hauleth View on GitHub
bug
Dominant language
Elixir
Stars
18
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I'm having trouble getting mix_machine to work how I'd expect it to. I want to use mix_machine in CI and have it cause CI to fail if there's a compilation warning. But if I use `mix compile.machine --warnings-as-errors` and there's a compilation warning then the sarif report doesn't get generated. And if I don't use `--warnings-as-errors` then CI doesn't fail. However when not in the CI environment (GitHub actions) `mix compile.machine --warnings-as-errors` does generate a report.

I'm testing with:
- Latest test run: https://github.com/axelson/password-validator/runs/4864051925?check_suite_focus=true
- Project code: https://github.com/axelson/password-validator/pull/22
- mix_machine code: https://github.com/axelson/mix_machine/blob/debug/lib/mix/tasks/compile.machine.ex#L60

It looks like the `Mix.Task.run("compile", argv)` never returns

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.