Feuerlabs / kvdb

Key value data base API
Mozilla Public License 2.0
36 stars 7 forks source link

dialyzer (unmatched) warnings #1

Closed norton closed 11 years ago

norton commented 12 years ago

There are a number of dialyzer unmatched warnings for kvdb (and otherwise). I don't mind trying to mechanically fix them but I thought it would be best to ask first.

$ dialyzer -q --plt /Users/norton/.dialyzer_plt.R15B02 -Wunmatched_returns -r .eunit find ./deps -name .eunit -print | xargs echo

eleveldb.erl:190: Expression produces a value of type string(), but this value is unmatched eleveldb.erl:197: Expression produces a value of type string(), but this value is unmatched eleveldb.erl:208: Expression produces a value of type string(), but this value is unmatched eleveldb.erl:217: Function fold_from_key_test/0 has no local return eleveldb.erl:218: Expression produces a value of type string(), but this value is unmatched eleveldb.erl:223: The call eleveldb:fold_keys(Ref::eleveldb:dbref(),fun((,_) -> nonempty_maybe_improper_list()),[],[{'firstkey',<<:8>>},...]) breaks the contract (db_ref(),fold_keys_fun(),any(),readoptions()) -> any() eleveldb.erl:228: Expression produces a value of type string(), but this value is unmatched eleveldb.erl:237: Expression produces a value of type string(), but this value is unmatched eleveldb.erl:241: Expression produces a value of type ['ok'], but this value is unmatched eleveldb.erl:246: Expression produces a value of type ['ok'], but this value is unmatched eleveldb.erl:256: The variable can never match since previous clauses completely covered the type 'false' eleveldb.erl:286: Expression produces a value of type [any()], but this value is unmatched eleveldb.erl:297: Expression produces a value of type ['ok'], but this value is unmatched error_logger_lager_h.erl:66: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched error_logger_lager_h.erl:279: Function print_val/1 has no local return gen_leader.erl:469: Expression produces a value of type 'nop' | {[any()],[atom()]}, but this value is unmatched genleader.erl:577: Expression produces a value of type {'error',} | {'ok','cancel'}, but this value is unmatched genleader.erl:640: Expression produces a value of type {'error',} | {'ok','cancel'}, but this value is unmatched gen_leader.erl:648: Expression produces a value of type [{'heartbeat',atom()}], but this value is unmatched genleader.erl:849: Expression produces a value of type {'error',} | {'ok','cancel'}, but this value is unmatched gen_leader.erl:913: The call sys:handle_debug(Debug::any(),{'gen_leader', 'printevent'},atom(),{'in',}) breaks the contract (Debug,FormFunc,Extra,Event) -> [dbg_opt()] when is_subtype(Debug,[dbg_opt()]), is_subtype(FormFunc,dbg_fun()), is_subtype(Extra,term()), is_subtype(Event,system_event()) gen_leader.erl:929: Function system_terminate/4 has no local return gen_leader.erl:1100: The call sys:handle_debug(Debug::any(),{'gen_leader', 'print_event'},atom(),Event::{'$leadercast',} | {'noreply',} | {'ok',} | {'out',,,_}) breaks the contract (Debug,FormFunc,Extra,Event) -> [dbg_opt()] when is_subtype(Debug,[dbg_opt()]), is_subtype(FormFunc,dbg_fun()), is_subtype(Extra,term()), is_subtype(Event,system_event()) genleader.erl:1112: Expression produces a value of type {'error',} | {'ok','cancel'}, but this value is unmatched genleader.erl:1279: Expression produces a value of type {'error',} | {'ok',timer:tref()}, but this value is unmatched gen_leader.erl:1448: Expression produces a value of type {'monreply',{,_}}, but this value is unmatched gen_leader.erl:1452: Expression produces a value of type {'monreply',{,}}, but this value is unmatched gproc.erl:822: The pattern <, > can never match since previous clauses completely covered the type <atom(),{'n','l',}> gproc_dist.erl:23: Callback info about the gen_leader behaviour is not available gprocdist.erl:704: The pattern <Key = {'c', 'l', }, Ops, Pid> can never match the type <{'c','g',},,_> gproc_dist.erl:717: Function expand_ops/1 will never be called gprocps.erl:294: Expression produces a value of type 'true' | integer(), but this value is unmatched kvdb.erl:157: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdb_app.erl:36: Expression produces a value of type [{'ok','undefined' | pid()}], but this value is unmatched kvdb_conf.erl:1116: Guard test is_integer(I::binary() | maybe_improper_list(any(),binary() | [])) can never succeed kvdb_conf.erl:1224: Expression produces a value of type ['ok'], but this value is unmatched kvdb_direct.erl:93: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:99: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:114: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:128: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:136: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:140: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:163: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:173: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:183: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:193: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:203: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:225: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:230: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_direct.erl:265: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_ets.erl:18: Callback info about the kvdb behaviour is not available kvdb_ets.erl:132: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdbets.erl:155: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdbets.erl:183: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdb_ets.erl:203: Expression produces a value of type ['true'], but this value is unmatched kvdb_ets.erl:246: Expression produces a value of type 'ok' | non_neg_integer(), but this value is unmatched kvdb_ets.erl:292: Expression produces a value of type ['true'], but this value is unmatched kvdb_ets.erl:460: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_ets.erl:495: Expression produces a value of type 'ok' | {'error','lager_not_running'}, but this value is unmatched kvdb_ets.erl:523: Expression produces a value of type 'false' | 'ok' | 'true' | {'error','badarg' | 'illegal'}, but this value is unmatched kvdb_ets.erl:839: Expression produces a value of type ['true'], but this value is unmatched kvdb_leveldb.erl:17: Callback info about the kvdb behaviour is not available kvdbleveldb.erl:128: The pattern [Kdec, Rest] can never match the type {,binary()} kvdbleveldb.erl:174: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdb_leveldb.erl:188: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched kvdb_leveldb.erl:191: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched kvdbleveldb.erl:233: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdbleveldb.erl:234: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdbleveldb.erl:235: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdbleveldb.erl:236: Expression produces a value of type 'ok' | {'error',}, but this value is unmatched kvdb_leveldb.erl:259: Expression produces a value of type 'blocked' | 'done' | 'false' | 'ok' | 'true' | maybe_improperlist(any(),'ok' | []) | {'ok' | [any()],}, but this value is unmatched kvdb_leveldb.erl:265: Expression produces a value of type 'ok'

norton commented 11 years ago

Marking this issue as closed.