Skip to content

Commit

Permalink
setup dialyzer (#61)
Browse files Browse the repository at this point in the history
Co-authored-by: emmanuel.pinault <[email protected]>
  • Loading branch information
epinault and epinault authored Mar 26, 2024
1 parent 532027d commit 4f230ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dialyzer.ignore-warnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
lib/uinta/formatter/util.ex:62: Unknown type 'Elixir.Logger.Formatter':time/0
lib/uinta/plug.ex:222: The test binary() == 'nil' can never evaluate to 'true'
lib/uinta/plug.ex:224: The pattern 'false' can never match the type 'true'
lib/uinta/plug.ex:257: The pattern <#{'query':=_query@1}, _> can never match the type <#{'operation':=binary(), 'type':=<<_:40,_:_*24>>, 'variables':=binary()},#{'filter_variables':=[binary()], 'format':='json' | 'map' | 'string', 'ignored_paths':=[binary()], 'include_datadog_fields':=boolean(), 'include_unnamed_queries':='true', 'include_variables':=boolean(), 'level':='alert' | 'critical' | 'debug' | 'emergency' | 'error' | 'info' | 'notice' | 'warn' | 'warning'}>
lib/uinta/plug.ex:262: The variable _ can never match since previous clauses completely covered the type #{'operation':=binary(), 'type':=<<_:40,_:_*24>>, 'variables':=binary()}
6 changes: 6 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ defmodule Uinta.MixProject do
homepage_url: @project_url,
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: [
ignore_warnings: ".dialyzer.ignore-warnings",
list_unused_filters: true,
plt_add_apps: [:mix]
],
docs: docs(),
package: package(),
test_coverage: [summary: [threshold: 80]]
Expand All @@ -30,6 +35,7 @@ defmodule Uinta.MixProject do
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test]},
{:dialyxir, "~> 1.4", only: :dev, runtime: false},
{:ex_doc, "~> 0.30", only: :dev, runtime: false},
{:jason, "~> 1.4"},
{:plug, "~> 1.10", optional: true}
Expand Down
2 changes: 2 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
%{
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
"credo": {:hex, :credo, "1.7.5", "643213503b1c766ec0496d828c90c424471ea54da77c8a168c725686377b9545", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "f799e9b5cd1891577d8c773d245668aa74a2fcd15eb277f51a0131690ebfb3fd"},
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.31.2", "8b06d0a5ac69e1a54df35519c951f1f44a7b7ca9a5bb7a260cd8a174d6322ece", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "317346c14febaba9ca40fd97b5b5919f7751fb85d399cc8e7e8872049f37e0af"},
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
Expand Down

0 comments on commit 4f230ca

Please sign in to comment.