jeremyjh / dialyxir

Mix tasks to simplify use of Dialyzer in Elixir projects.
Apache License 2.0
1.68k stars 142 forks source link

Bug: ignore_format_strict output + actual usage in ignore file + list_unused_filters: true #532

Open Nezteb opened 5 months ago

Nezteb commented 5 months ago

Current behavior

I added this new ignore file format in https://github.com/jeremyjh/dialyxir/pull/493 and only recently have had a chance to test this in the wild along with list_unused_filters: true. It works for many error descriptions, unless they contain newlines.

If any of the error descriptions for your project contains newlines, you copy-paste the --format ignore_format_strict output into your .dialyzer_ignore.exs, and you re-run mix dialyzer you will get failures about unused filters. Newlines often show up in multi-line code snippets, and the string handling I added doesn't handle newlines appropriately. I don't have any good examples I can copy paste at the moment. 😅

Expected behavior

When comparing the ignorefile line with the incoming error description, I think we can just replace all whitespace with spaces and then trim duplicates?

I have a branch working on the fix, but I find myself running out of free time more and more.