zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

opaque_guard.ex (672B)


      1 defmodule Dialyxir.Warnings.OpaqueGuard do
      2   @behaviour Dialyxir.Warning
      3 
      4   @impl Dialyxir.Warning
      5   @spec warning() :: :opaque_guard
      6   def warning(), do: :opaque_guard
      7 
      8   @impl Dialyxir.Warning
      9   @spec format_short([String.t()]) :: String.t()
     10   def format_short([guard | _]) do
     11     "The guard test #{guard} breaks the opaqueness of its argument."
     12   end
     13 
     14   @impl Dialyxir.Warning
     15   @spec format_long([String.t()]) :: String.t()
     16   def format_long([guard, args]) do
     17     "The guard test #{guard}#{args} breaks the opaqueness of its argument."
     18   end
     19 
     20   @impl Dialyxir.Warning
     21   @spec explain() :: String.t()
     22   def explain() do
     23     Dialyxir.Warning.default_explain()
     24   end
     25 end