From e65e74d370eb6a3acc69731788e15cab48865939 Mon Sep 17 00:00:00 2001 From: lud Date: Sun, 1 Dec 2024 13:57:19 +0100 Subject: [PATCH] chore: Fix dialyzer warning --- .github/workflows/ci.yml | 24 ------------------------ mix.exs | 1 + test/support/utils.ex | 5 +++-- 3 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 52a383a..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: push - -jobs: - test: - runs-on: ubuntu-latest - name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} - strategy: - fail-fast: true - matrix: - otp: ["26", "27"] - elixir: ["1.16", "1.17"] - exclude: - - otp: "27" - elixir: "1.16" - steps: - - uses: actions/checkout@v2 - - uses: erlef/setup-beam@v1 - with: - version-type: strict - otp-version: ${{matrix.otp}} - elixir-version: ${{matrix.elixir}} - - run: mix deps.get - - run: mkdir -p test/tmp - - run: mix test diff --git a/mix.exs b/mix.exs index 90be5c3..aa687ce 100644 --- a/mix.exs +++ b/mix.exs @@ -81,6 +81,7 @@ defmodule Mutex.Mixfile do [ flags: [:unmatched_returns, :error_handling, :unknown, :extra_return], list_unused_filters: true, + plt_add_apps: [:ex_unit], plt_local_path: "_build/plts" ] end diff --git a/test/support/utils.ex b/test/support/utils.ex index 89b684e..9aeb823 100644 --- a/test/support/utils.ex +++ b/test/support/utils.ex @@ -119,7 +119,8 @@ defmodule Mutex.Test.Utils do Ensures that the exception message can be generated """ def ensure_message(e) do - ExUnit.Assertions.refute(Exception.message(e) =~ "failed to produce a message with") - e + if Exception.message(e) =~ "failed to produce a message with" do + ExUnit.Assertions.flunk("Exception cannot produce a message: #{inspect(e)}") + end end end