jeremyjh / dialyxir

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

Failed to parse warning #431

Open metelik opened 3 years ago

metelik commented 3 years ago

Environment

Current behavior

[{:"(", 1}, {:"#", 1}, {:atom_part, 1, 'r'}, {:atom_part, 1, 'a'}, {:atom_part, 1, 'd'}, {:atom_part, 1, 'i'}, {:atom_part, 1, 'u'}, {:atompart, 1, 's'}, {:, 1}, {:atom_part, 1, 'r'}, {:atom_part, 1, 'e'}, {:atom_part, 1, 'q'}, {:atom_part, 1, 'u'}, {:atom_part, 1, 'e'}, {:atom_part, 1, 's'}, {:atom_part, 1, 't'}, {:"{", 1}, {:"}", 1}, {:",", 1}, {:atom_part, 1, 'a'}, {:atom_part, 1, 't'}, {:atom_part, 1, 't'}, {:atom_part, 1, 'r'}, {:atom_part, 1, 'i'}, {:atom_part, 1, 'b'}, {:atom_part, 1, 'u'}, {:atom_part, 1, 't'}, {:atompart, 1, 'e'}, {:, 1}, {:atom_part, 1, 'l'}, {:atom_part, 1, 'i'}, {:atom_part, 1, 's'}, {:atom_part, 1, 't'}, {:"(", 1}, {:")", 1}, {:")", 1}, {:->, 1}, {:"#", 1}, {:atom_part, 1, 'r'}, {:atom_part, 1, 'a'}, {:atom_part, 1, 'd'}, {:atom_part, 1, 'i'}, {:atom_part, 1, 'u'}, {:atompart, 1, 's'}, {:, 1}, {:atom_part, 1, 'r'}, {:atom_part, 1, 'e'}, {:atom_part, 1, ...}, {:atom_part, ...}, {...}, ...]

mix dialyzer --format raw : {:warn_failing_call, {'lib/network_manager/radius.ex', 99}, {:call, [:eradius_lib, :set_attributes, '({\'radiusrequest\', 0, \'request\', [], \'undefined\', \'undefined\', \'false\', <<>>},[{1 | 2,},...])', [1], :both, '({\'radius_request\',byte(),\'accept\' | \'accreq\' | \'accresp\' | \'challenge\' | \'coaack\' | \'coanak\' | \'coareq\' | \'discack\' | \'discnak\' | \'discreq\' | \'reject\' | \'request\',[{posinteger() | {,} | {,,,,},}],binary(),<<:128>>,boolean(),binary()},[{pos_integer() | {pos_integer(),pos_integer()} | {\'attribute\',posinteger() | {,},\'abinary\' | \'binary\' | \'date\' | \'integer\' | \'integer64\' | \'ipaddr\' | \'ipv6addr\' | \'ipv6prefix\' | \'octets\' | \'string\' | {,_},[any()],\'ascend\' | \'no\' | \'saltcrypt\' | \'scramble\'},}])', '{\'radius_request\',byte(),\'accept\' | \'accreq\' | \'accresp\' | \'challenge\' | \'coaack\' | \'coanak\' | \'coareq\' | \'discack\' | \'discnak\' | \'discreq\' | \'reject\' | \'request\',[{posinteger() | {,} | {,,,,},}],binary(),<<:128>>,boolean(),binary()}', {true, '(#radius_request{},attribute_list()) -> #radius_request{}'}]}}

Expected behavior

I think the dialyxir misses the warn_failing_call parsing: x@ubuntu:/home/src/agilis_fw/common_core.x86.radius$ mix dialyzer.explain warn_failing_call (...) Unknown warning named: warn_failing_call

It would be nifty to have it parsed and displayed neatly.

metelik commented 3 years ago

The easiest way to reproduce is to use the following example: https://github.com/xerions/exradius/blob/master/lib/sample.ex