Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): 1.1.0 (erlex is 0.2.6)
Current behavior
I'm getting a warning that doesn't make sense (an else clause from a with construct, but that's a separate issue) that I'd like to ignore. I have tried adding a regex to my dialyzer ignore file and I'm seeing weird behavior wrt that regex actually filtering the warning.
Here is the warning (somewhat redacted):
# --format dialyzer
lib/foo_server.ex:49: The pattern {'error', 'not_found'} can never match the type {'error','some_error1' | 'some_error2'}
# --format raw
{:warn_matching, {'lib/foo_server.ex', 49}, {:pattern_match, ['pattern {\'error\', \'not_found\'}', '{\'error\',\'some_error1\' | \'some_error2\'}']}}
It seems whenever I include any subset of not_found in the regex, it does not work ("work" == "ignores the warning"). Here are some regexes that do/do not work:
~r/foo_server\.ex/ - works
~r/foo_server\.ex.*pattern/ - works
~r/foo_server\.ex.*pattern.*never match/ - works
~r/foo_server\.ex.*pattern.*not/ - does not work
~r/foo_server\.ex.*pattern.*not_found/ - does not work
Expected behavior
I would have expected all of these regexes to work.
Precheck
Environment
Elixir & Erlang/OTP versions (elixir --version): Elixir 1.11.0, Erlang/OTP 23
Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): 1.1.0 (erlex is 0.2.6)
Current behavior
I'm getting a warning that doesn't make sense (an
else
clause from awith
construct, but that's a separate issue) that I'd like to ignore. I have tried adding a regex to my dialyzer ignore file and I'm seeing weird behavior wrt that regex actually filtering the warning.Here is the warning (somewhat redacted):
It seems whenever I include any subset of
not_found
in the regex, it does not work ("work" == "ignores the warning"). Here are some regexes that do/do not work:~r/foo_server\.ex/
- works~r/foo_server\.ex.*pattern/
- works~r/foo_server\.ex.*pattern.*never match/
- works~r/foo_server\.ex.*pattern.*not/
- does not work~r/foo_server\.ex.*pattern.*not_found/
- does not workExpected behavior
I would have expected all of these regexes to work.