From 079afd32d86ae5211106cdc9e1916c6640bedd39 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Jun 2021 14:19:26 -0500 Subject: Enable :warnings_as_errors for CI only --- mix.exs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mix.exs b/mix.exs index a0a6106a9..85d5c7b55 100644 --- a/mix.exs +++ b/mix.exs @@ -8,7 +8,7 @@ def project do elixir: "~> 1.9", elixirc_paths: elixirc_paths(Mix.env()), compilers: [:phoenix, :gettext] ++ Mix.compilers(), - elixirc_options: [warnings_as_errors: warnings_as_errors(Mix.env())], + elixirc_options: [warnings_as_errors: warnings_as_errors()], xref: [exclude: [:eldap]], start_permanent: Mix.env() == :prod, aliases: aliases(), @@ -90,8 +90,7 @@ defp elixirc_paths(:benchmark), do: ["lib", "benchmarks"] defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] - defp warnings_as_errors(:prod), do: false - defp warnings_as_errors(_), do: true + defp warnings_as_errors, do: System.get_env("CI") == "true" # Specifies OAuth dependencies. defp oauth_deps do -- cgit v1.2.3