Skip to content

Commit

Permalink
Added --warnings-as-errors to mix test but only when called by ex_check
Browse files Browse the repository at this point in the history
  • Loading branch information
kieraneglin committed Dec 13, 2024
1 parent 023f449 commit 0be469d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Application.put_env(:pinchflat, :http_client, HTTPClientMock)
Mox.defmock(UserScriptRunnerMock, for: Pinchflat.Lifecycle.UserScripts.UserScriptCommandRunner)
Application.put_env(:pinchflat, :user_script_runner, UserScriptRunnerMock)

if System.get_env("EX_CHECK"), do: Code.put_compiler_option(:warnings_as_errors, true)

ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(Pinchflat.Repo, :manual)
Faker.start()
Expand Down
3 changes: 2 additions & 1 deletion tooling/.check.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
{:formatter, env: %{"MIX_ENV" => "test"}},
{:sobelow, "mix sobelow --config"},
{:prettier_formatting, "yarn run lint:check", fix: "yarn run lint:fix"},
{:npm_test, false}
{:npm_test, false},
{:ex_unit, env: %{"MIX_ENV" => "test", "EX_CHECK" => "1"}}

## curated tools may be disabled (e.g. the check for compilation warnings)
# {:compiler, false},
Expand Down

0 comments on commit 0be469d

Please sign in to comment.