Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error When Blank Ignore File #405

Closed
jherdman opened this issue Aug 3, 2020 · 0 comments · Fixed by #543
Closed

Error When Blank Ignore File #405

jherdman opened this issue Aug 3, 2020 · 0 comments · Fixed by #543

Comments

@jherdman
Copy link

jherdman commented Aug 3, 2020

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.10.4 (compiled with Erlang/OTP 23)
  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir):
  "dialyxir": {:hex, :dialyxir, "1.0.0", "6a1fa629f7881a9f5aaf3a78f094b2a51a0357c843871b8bc98824e7342d00a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "aeb06588145fac14ca08d8061a142d52753dbc2cf7f0d00fc1013f53f8654654"},

Current behavior

If you set up a dialyzer ignore file, but accidentally leave it blank you see the following error:

** (Protocol.UndefinedError) protocol Enumerable not implemented for nil of type Atom
    (elixir 1.10.4) lib/enum.ex:1: Enumerable.impl_for!/1
    (elixir 1.10.4) lib/enum.ex:141: Enumerable.reduce/3
    (elixir 1.10.4) lib/enum.ex:3383: Enum.reduce/3
    lib/dialyxir/formatter.ex:20: Dialyxir.Formatter.format_and_filter/4
    lib/dialyxir/dialyzer.ex:53: Dialyxir.Dialyzer.Runner.run/2
    lib/dialyxir/dialyzer.ex:75: Dialyxir.Dialyzer.dialyze/3
    lib/mix/tasks/dialyzer.ex:267: Mix.Tasks.Dialyzer.run_dialyzer/2
    lib/mix/tasks/dialyzer.ex:199: Mix.Tasks.Dialyzer.run/1

This error is difficult to understand, and does not help identify the root cause.

Expected behavior

A friendly error message to the effect of, "Your dialyzer ignore file doesn't have the correct format. Please see HELPFUL URL for more details."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant