Closed Nezteb closed 1 year ago
Does mix dialyzer --format ignore_file >> .dialyzer_ignore.exs
not achieve this? If you want to use dialyxir as more like a library its probably already quite close to being able to do that and I'm happy to accept PRs that support that.
OHHHHH, holy cow that's awesome. That combined with list_unused_filters: true
does exactly what I want.
I think I misunderstood how .dialyzer_ignore.exs
could be used: I thought it was only for situations like "we don't ever care about fixing :no_return
types, so we'll just blanket ignore them".
Thank you a ton Jeremy!
Several months ago I watched this talk on
dialyzer
: https://www.youtube.com/watch?v=4PZE40h13wMI'd like to replicate some of what the speaker was talking about: adding
dialyzer
to a large existing project but only failing the CI typecheck step if new errors are added.Upon adding
dialyxir
to my employer's main Elixir service,mix dialyzer
gives:Not too bad!..? (😓)
Here's a theoretical mix task I would like to create: https://gist.github.com/Nezteb/eb654f399fa599d0805d38d9a4b56da4
Currently when running
output = Mix.Task.run("dialyzer", ["--quiet", "--format", "ignore_file"])
, I get nothing as output because thedialyzer
mix task prints to standard out.Is there a way for me to acquire a list of the error tuples so that I can compare them to a known set of similar error tuples?
If not, my next attempt would be to use a bash script and compare the raw text output of
mix dialyzer --quiet --format ignore_file
with adialyzer-errors.txt
file (or something like that), but that wouldn't be ideal.Any and all ideas would be appreciated!