Permalink
Browse files

ignore dialyzer no-match warnings on pokemon_pb

Dialyzer complains about clauses that can never match in the generated
code for a very simple protobuf definition I'm using. I'd like to keep
dialyzer in the default make target, so I'm adding an ignore directive
for that warning to pokemon_pb, which is where the generated code
comes from.

Example warnings:
  47: Guard test is_list(Records::tuple()) can never succeed
  74: The pattern <_, 'repeated_packed', 'undefined', _, _> can never match the type <1 | 2 | 3 | 4 | 5 | 6 | 7 | 2046 | 2047,'optional' | 'repeated',_,atom(),[any()]>
  75: The pattern <_, 'repeated_packed', [], _, _> can never match the type <1 | 2 | 3 | 4 | 5 | 6 | 7 | 2046 | 2047,'optional' | 'repeated',_,atom(),[any()]>
  77: The pattern <FNum, 'required', 'undefined', Type, _> can never match the type <1 | 2 | 3 | 4 | 5 | 6 | 7 | 2046 | 2047,'optional' | 'repeated',_,atom(),[any()]>
  86: The pattern <FNum, 'repeated_packed', Data, Type, _> can never match the type <1 | 2 | 3 | 4 | 5 | 6 | 7 | 2046 | 2047,'optional' | 'repeated',_,atom(),[any()]>
 222: The pattern <Types, [{FNum, Bytes} | Tail], Acc> can never match the type <_,[],[{_,_}]>
  • Loading branch information...
beerriot committed Feb 24, 2018
1 parent 0dde9d3 commit 07924e2f3caca7ca741532bbd2a352b6ad5748dd
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/pokemon_pb.erl
@@ -31,6 +31,8 @@
-export([int_to_enum/2, enum_to_int/2]).
-record(pikachu, {abc, def, '$extensions' = dict:new()}).
-dialyzer(no_match).
%% ENCODE
encode([]) ->
[];

0 comments on commit 07924e2

Please sign in to comment.