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

Fix Dialyzer warnings and remove ignore file #952

Merged
merged 5 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions dialyzer.ignore-warnings

This file was deleted.

11 changes: 2 additions & 9 deletions lib/mix/tasks/appsignal.install.ex
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,8 @@ defmodule Mix.Tasks.Appsignal.Install do

case File.open(appsignal_config_file_path(), [:write]) do
{:ok, file} ->
case IO.binwrite(file, appsignal_config_file_contents(config)) do
:ok ->
IO.puts("Success!")

{:error, reason} ->
IO.puts("Failure! #{inspect(reason)}")
exit(:shutdown)
end

IO.binwrite(file, appsignal_config_file_contents(config))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@unflxw unflxw Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't fail, but it will silently swallow the error -- it needs to at least be :ok = IO.binwrite(...), for compatibility with older Elixir versions.

(but also, see the other comment, re: the error handling)

IO.puts("Success!")
jeffkreeftmeijer marked this conversation as resolved.
Show resolved Hide resolved
File.close(file)

{:error, reason} ->
Expand Down
1 change: 0 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ defmodule Appsignal.Mixfile do
extras: ["README.md", "CHANGELOG.md"]
],
dialyzer: [
ignore_warnings: "dialyzer.ignore-warnings",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: [:mix]
]
Expand Down
Loading