jeremyjh / dialyxir

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

Fix Formatting of `:record_match` #527

Closed maennchen closed 7 months ago

maennchen commented 7 months ago

Fixes #445

Example Error before:

Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.

Unknown warning:
:record_match

Legacy warning:
src/jwe/jose_jwe_alg_ecdh_ss.erl:269:1: Matching of pattern {'jose_jwe_alg_ecdh_ss', SPK = {'jose_jwk', _, _, _}, _, _, _, _, _, _} tagged with a record name violates the declared type of #jose_jwe_alg_ecdh_ss{spk::'undefined' | {_,map()},apu::'undefined' | binary(),apv::'undefined' | binary(),wrap::'aes_gcm_kw' | 'aes_kw' | 'c20p_kw' | 'undefined' | 'xc20p_kw',bits::'undefined' | 128 | 192 | 256,iv::'undefined' | binary(),tag::'undefined' | binary()}

Example Error after:

src/jwe/jose_jwe_alg_ecdh_ss.erl:269:1:record_match
The pattern {'jose_jwe_alg_ecdh_ss', SPK = {'jose_jwk', _, _, _}, _, _, _, _, _, _} violates the declared type for ##jose_jwe_alg_ecdh_ss{spk::'undefined' | {_,map()},apu::'undefined' | binary(),apv::'undefined' | binary(),wrap::'aes_gcm_kw' | 'aes_kw' | 'c20p_kw' | 'undefined' | 'xc20p_kw',bits::'undefined' | 128 | 192 | 256,iv::'undefined' | binary(),tag::'undefined' | binary()}{}.
jeremyjh commented 7 months ago

Thanks!