I started using Dialyzer (dialyxir 1.0.0-rc.6) on my umbrella project based on Phoenix 1.4.
When I ran mix dialyzer
on it for the first time, I got this warning.
apps/my_app/lib/my_app_web/gettext.ex:1:pattern_match_cov
The pattern
%{}
can never match since previous clauses completely cover the type
%{:count => _, _ => _}
Here is the content of this file (gettext.ex
):
defmodule MyProject.MyAppWeb.Gettext do
@moduledoc """
(*snip*)
"""
use Gettext, otp_app: :my_app
end
I did not touch it. How can I fix it or suppress warnings?
[UPDATE]
I found this issue closed on 20 Feb 2018:
https://github.com/elixir-lang/gettext/issues/115
I confirmed that newly created phoenix app does not produce dialyzer warnings. I also confirmed with another (freshly created) phoenix umbrella project.
I have not found any solution for my existing project.
[UPDATE 2]
I found how to reproduce my problem.
The newly created application will not warn you, but it will warn you if it contains translation data that actually needs interpolation.
See my github issue comment for more information:
https://github.com/elixir-lang/gettext/issues/115#issuecomment-491591307