Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kazoo 3689: fix some noisy dialyzer warnings #1050

Merged
merged 17 commits into from May 21, 2015
Merged

Kazoo 3689: fix some noisy dialyzer warnings #1050

merged 17 commits into from May 21, 2015

Conversation

fenollp
Copy link
Contributor

@fenollp fenollp commented May 21, 2015

No description provided.

fenollp added 16 commits May 20, 2015 17:51
warn_contract_supertype       milliwatt_route_req.erl:57: Type specification milliwatt_route_req:tone_or_echo(whapps_call:call()) -> atom() is a supertype of the success typing: milliwatt_route_req:tone_or_echo(_) -> 'echo' | 'tone' | 'undefined'
warn_matching                 milliwatt_sup.erl:58: The pattern <N, 'cache'> can never match the type <'milliwatt_shared_listener','worker'>
warn_contract_supertype       notify.erl:58: Type specification notify:start_deps() -> _ is a supertype of the success typing: notify:start_deps() -> [any()]
warn_contract_supertype       notify_fax_util.erl:57: The specification for notify_fax_util:raw_attachment_binary/1 states that the function might also return {'error',_} but the inferred return is {'ok',_,_}
warn_contract_supertype       notify_fax_util.erl:60: The specification for notify_fax_util:raw_attachment_binary/2 states that the function might also return {'error',_} but the inferred return is {'ok',_,_}
warn_contract_supertype       notify_fax_util.erl:63: The specification for notify_fax_util:raw_attachment_binary/3 states that the function might also return {'error',_} but the inferred return is {'ok',_,_}
warn_contract_supertype       notify_low_balance.erl:122: The specification for notify_low_balance:collect_recipients/1 states that the function might also return <<_:8,_:_*8>> but the inferred return is 'undefined' | ['undefined' | binary()]
warn_contract_supertype       notify_maintenance.erl:36: Type specification notify_maintenance:check_initial_call(text()) -> 'ok' is a supertype of the success typing: notify_maintenance:check_initial_call(binary()) -> 'ok'
warn_contract_supertype       notify_maintenance.erl:55: Type specification notify_maintenance:check_initial_registration(text()) -> 'ok' is a supertype of the success typing: notify_maintenance:check_initial_registration(binary()) -> 'ok'
warn_umatched_return          notify_new_account.erl:77: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
warn_contract_supertype       notify_util.erl:435: Type specification notify_util:get_charset_params(term()) -> tuple() is a supertype of the success typing: notify_util:get_charset_params(_) -> {[{<<_:152>>,[any(),...]}],binary()}
warn_umatched_return          hotornot_maintenance.erl:55: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          hotornot_maintenance.erl:69: Expression produces a value of type ['ok'], but this value is unmatched
warn_contract_supertype       conf_pronounced_name.erl:41: The specification for conf_pronounced_name:lookup_name/1 states that the function might also return {'temp_doc_id',<<_:8,_:_*8>>,<<_:8,_:_*8>>} but the inferred return is 'undefined' | {'media_doc_id',_,_}
warn_contract_supertype       conf_pronounced_name.erl:48: The specification for conf_pronounced_name:lookup_user_name/2 states that the function might also return {'temp_doc_id',<<_:8,_:_*8>>,<<_:8,_:_*8>>} but the inferred return is 'undefined' | {'media_doc_id',_,_}
warn_contract_supertype       conf_pronounced_name.erl:127: The specification for conf_pronounced_name:save_recording/3 states that the function might also return 'undefined' but the inferred return is {'media_doc_id',_,<<_:8,_:_*8>>} | {'temp_doc_id',_,<<_:8,_:_*8>>}
warn_umatched_return          fax_cloud.erl:82: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          fax_cloud.erl:200: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          fax_smtp.erl:675: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          fax_smtp.erl:682: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          fax_smtp.erl:715: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          fax_smtp.erl:722: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          fax_smtp.erl:729: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_contract_supertype       fax_smtp.erl:108: The specification for fax_smtp:handle_MAIL/2 states that the function might also return {'error',string(),{'state',[any()],'undefined' | binary(),'undefined' | binary(),_,'undefined' | binary(),'undefined' | binary(),'undefined' | {{byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()},non_neg_integer()},'undefined' | binary(),'undefined' | binary(),'undefined' | binary(),_,[<<_:8,_:_*8>>],'undefined' | binary(),'undefined' | binary(),'undefined' | binary()}} but the inferred return is {'ok',{'state',[any()],'undefined' | binary(),'undefined' | binary(),_,'undefined' | binary(),'undefined' | binary(),'undefined' | {_,_},'undefined' | binary(),'undefined' | binary(),'undefined' | binary(),_,[any()],'undefined' | binary(),'undefined' | binary(),'undefined' | binary()}}
warn_contract_supertype       fax_smtp.erl:184: The specification for fax_smtp:handle_VRFY/2 states that the function might also return {'ok',string(),{'state',[any()],'undefined' | binary(),'undefined' | binary(),_,'undefined' | binary(),'undefined' | binary(),'undefined' | {{byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()},non_neg_integer()},'undefined' | binary(),'undefined' | binary(),'undefined' | binary(),_,[<<_:8,_:_*8>>],'undefined' | binary(),'undefined' | binary(),'undefined' | binary()}} but the inferred return is {'error',[1..255,...],_}
warn_umatched_return          fax_smtp.erl:243: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_contract_supertype       fax_smtp.erl:319: Type specification fax_smtp:error_doc() -> binary() is a supertype of the success typing: fax_smtp:error_doc() -> <<_:8,_:_*8>>
warn_contract_supertype       fax_sup.erl:67: Type specification fax_sup:smtp_sessions() -> any() is a supertype of the success typing: fax_sup:smtp_sessions() -> non_neg_integer()
warn_contract_supertype       fax_util.erl:202: Type specification fax_util:is_digit(integer()) -> boolean() is a supertype of the success typing: fax_util:is_digit(byte()) -> boolean()
warn_contract_supertype       fax_worker.erl:694: The specification for fax_worker:fetch_document_from_attachment/2 states that the function might also return {'error',_} but the inferred return is {'ok',[48 | 50,...],[{[any(),...],_},...],_}
warn_umatched_return          fax_xmpp_sup.erl:47: Expression produces a value of type ['ok' | {'error','not_found' | 'restarting' | 'running' | 'simple_one_for_one'}], but this value is unmatched
warn_umatched_return          fax_jobs.erl:171: Expression produces a value of type [any()], but this value is unmatched
warn_contract_supertype       fax_listener.erl:180: Type specification fax_listener:start_all_printers() -> any() is a supertype of the success typing: fax_listener:start_all_printers() -> [any()]
warn_umatched_return          fax_maintenance.erl:216: Expression produces a value of type 'ok' | ['ok'], but this value is unmatched
warn_umatched_return          fax_maintenance.erl:245: Expression produces a value of type 'ok' | ['ok'], but this value is unmatched
warn_umatched_return          fax_maintenance.erl:268: Expression produces a value of type 'ok' | ['ok'], but this value is unmatched
warn_umatched_return          fax_maintenance.erl:290: Expression produces a value of type 'ok' | ['ok'], but this value is unmatched
warn_umatched_return          fax_maintenance.erl:309: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
warn_umatched_return          omnip_dialog.erl:60: Expression produces a value of type {'ok',_}, but this value is unmatched
warn_umatched_return          omnip_dialog.erl:371: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          omnip_message_summary.erl:57: Expression produces a value of type {'ok',_}, but this value is unmatched
warn_umatched_return          omnip_message_summary.erl:231: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          omnip_presence.erl:65: Expression produces a value of type {'ok',_}, but this value is unmatched
warn_umatched_return          omnip_presence.erl:335: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          omnip_presence.erl:348: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          omnipresence_maintenance.erl:46: Expression produces a value of type ['ok'], but this value is unmatched
warn_contract_supertype       omnip_dialog.erl:185: Type specification omnip_dialog:handle_answered_channel(wh_json:object()) -> any() is a supertype of the success typing: omnip_dialog:handle_answered_channel(_) -> 'ok'
warn_contract_supertype       omnip_dialog.erl:192: Type specification omnip_dialog:handle_destroyed_channel(wh_json:object()) -> any() is a supertype of the success typing: omnip_dialog:handle_destroyed_channel(_) -> 'ok'
warn_contract_supertype       omnip_dialog.erl:230: Type specification omnip_dialog:maybe_handle_presence_state(wh_json:object(),api_binary()) -> 'ok' is a supertype of the success typing: omnip_dialog:maybe_handle_presence_state(_,<<_:8,_:_*8>>) -> 'ok'
warn_contract_supertype       omnip_dialog.erl:240: Type specification omnip_dialog:handle_update(wh_json:object(),ne_binary()) -> any() is a supertype of the success typing: omnip_dialog:handle_update(_,<<_:40,_:_*8>>) -> 'ok'
warn_contract_supertype       omnip_subscriptions.erl:458: Type specification omnip_subscriptions:expire_old_subscriptions() -> integer() is a supertype of the success typing: omnip_subscriptions:expire_old_subscriptions() -> non_neg_integer()
warn_umatched_return          teletype_renderer.erl:182: Expression produces a value of type [any()], but this value is unmatched
warn_contract_supertype       teletype_fax_util.erl:218: The specification for teletype_fax_util:get_attachment_binary/3 states that the function might also return {'error','no_attachment'} but the inferred return is [] | {'ok',<<_:8,_:_*8>>,binary()}
warn_contract_supertype       teletype_util.erl:118: The specification for teletype_util:maybe_relay_to_bcc/3 states that the function might also return {'error',_} but the inferred return is 'ok'
warn_contract_supertype       teletype_util.erl:264: Type specification teletype_util:default_content_transfer_encoding(binary()) -> binary() is a supertype of the success typing: teletype_util:default_content_transfer_encoding(<<_:8,_:_*8>>) -> <<_:_*48>>
warn_contract_supertype       teletype_util.erl:323: The specification for teletype_util:render_subject/2 states that the function might also return 'undefined' but the inferred return is binary()
warn_contract_supertype       teletype_util.erl:327: The specification for teletype_util:render/3 states that the function might also return 'undefined' but the inferred return is binary()
warn_umatched_return          cb_clicktocall.erl:269: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          cb_clicktocall.erl:278: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          cb_jobs_listener.erl:235: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          cb_jobs_listener.erl:255: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          cb_modules_util.erl:134: Expression produces a value of type [any()], but this value is unmatched
warn_contract_types           cb_modules_util.erl:215: Invalid type specification for function cb_modules_util:request_specific_extraction_funs/1. The success typing is (_) -> [{fun(),_}]
warn_contract_types           cb_modules_util.erl:216: Invalid type specification for function cb_modules_util:request_specific_extraction_funs_from_nouns/2. The success typing is (_,_) -> [{fun(),_}]
warn_umatched_return          cb_resources.erl:562: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          cb_vmboxes.erl:581: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          crossbar.erl:216: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
warn_umatched_return          crossbar_bindings.erl:167: Expression produces a value of type [any()], but this value is unmatched
warn_contract_supertype       crossbar_freeswitch.erl:237: Type specification crossbar_freeswitch:process_realms() -> any() is a supertype of the success typing: crossbar_freeswitch:process_realms() -> ['ok']
warn_contract_supertype       crossbar_freeswitch.erl:575: Type specification crossbar_freeswitch:xml_file_from_config(atom()) -> any() is a supertype of the success typing: crossbar_freeswitch:xml_file_from_config('freeswitch_chatplan' | 'freeswitch_dialplan' | 'freeswitch_directory') -> <<_:8,_:_*8>>
warn_contract_supertype       crossbar_freeswitch.erl:576: Type specification crossbar_freeswitch:xml_file_from_config(atom(),ne_binary()) -> any() is a supertype of the success typing: crossbar_freeswitch:xml_file_from_config('freeswitch_chatplan' | 'freeswitch_dialplan' | 'freeswitch_directory',<<_:8,_:_*8>>) -> <<_:8,_:_*8>>
warn_umatched_return          crossbar_freeswitch.erl:150: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          crossbar_freeswitch.erl:221: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          crossbar_freeswitch.erl:262: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          crossbar_freeswitch.erl:267: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          crossbar_freeswitch.erl:280: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          crossbar_freeswitch.erl:379: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
warn_umatched_return          crossbar_freeswitch.erl:431: Expression produces a value of type ['ok' | {'error',atom()}], but this value is unmatched
warn_umatched_return          crossbar_freeswitch.erl:488: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_contract_supertype       crossbar_maintenance.erl:130: The specification for crossbar_maintenance:start_module/1 states that the function might also return {'error',_} but the inferred return is 'ok'
warn_contract_supertype       crossbar_maintenance.erl:164: The specification for crossbar_maintenance:stop_module/1 states that the function might also return {'error',_} but the inferred return is 'ok'
warn_umatched_return          crossbar_maintenance.erl:887: Expression produces a value of type ['ok'], but this value is unmatched
warn_contract_types           crossbar_maintenance.erl:803: Invalid type specification for function crossbar_maintenance:init_apps/2. The success typing is (atom() | [atom() | [any()] | char()],_) -> 'ok'
warn_contract_types           crossbar_maintenance.erl:809: Invalid type specification for function crossbar_maintenance:find_apps/1. The success typing is (atom() | [atom() | [any()] | char()]) -> any()
warn_umatched_return          ecallmgr_call_events.erl:313: Expression produces a value of type ['true'], but this value is unmatched
warn_umatched_return          ecallmgr_fs_channels.erl:850: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          ecallmgr_fs_conference.erl:746: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          ecallmgr_fs_nodes.erl:149: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          ecallmgr_fs_nodes.erl:815: Expression produces a value of type ['ok'], but this value is unmatched
warn_matching                 ecallmgr_fs_notify.erl:129: The pattern 'undefined' can never match the type <<_:8,_:_*8>>
warn_matching                 ecallmgr_fs_notify.erl:184: The pattern 'undefined' can never match the type <<_:8,_:_*8>>
warn_matching                 ecallmgr_fs_notify.erl:241: The pattern 'undefined' can never match the type <<_:8,_:_*8>>
warn_matching                 ecallmgr_fs_notify.erl:247: The pattern 'undefined' can never match the type <<_:8,_:_*8>>
warn_umatched_return          ecallmgr_maintenance.erl:134: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          ecallmgr_maintenance.erl:139: Expression produces a value of type ['ok'], but this value is unmatched
warn_contract_types           ecallmgr_originate.erl:624: Invalid type specification for function ecallmgr_originate:get_unset_vars/1. The success typing is (_) -> [string()]
warn_umatched_return          ecallmgr_util.erl:1064: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          webhooks_listener.erl:158: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          webhooks_maintenance.erl:82: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          webhooks_maintenance.erl:91: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          webhooks_util.erl:340: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          whistle_snmp.erl:51: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          whistle_snmp.erl:53: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          whistle_snmp.erl:121: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
warn_umatched_return          cdr_maintenance.erl:91: Expression produces a value of type 'ok' | {'error',_} | {'ok',_}, but this value is unmatched
warn_umatched_return          cdr_v3_migrate_lib.erl:145: Expression produces a value of type ['ok' | {'error',_}], but this value is unmatched
warn_umatched_return          cdr_v3_migrate_lib.erl:178: Expression produces a value of type ['ok' | {'error',_}], but this value is unmatched
warn_umatched_return          cdr_v3_migrate_worker.erl:30: Expression produces a value of type ['ok' | [any()]], but this value is unmatched
warn_contract_types           cdr_v3_migrate_worker.erl:27: Invalid type specification for function cdr_v3_migrate_worker:migrate_account_cdrs/3. The success typing is (<<_:8,_:_*8>>,[{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255}],pos_integer()) -> 'ok'
warn_matching                 cdr_v3_migrate_worker.erl:52: The pattern {'error', _E} can never match the type 'ok'
warn_matching                 cdr_v3_migrate_worker.erl:71: The pattern {'error', _E} can never match the type 'ok' | 'undefined'
warn_failing_call             cdr_v3_migrate_worker.erl:85: The call filelib:ensure_dir(ArchivePath::binary()) breaks the contract (Name) -> 'ok' | {'error',Reason} when is_subtype(Name,filename() | dirname()), is_subtype(Reason,file:posix())
warn_return_no_exit           csv_util.erl:62: Function maybe_save_csv/2 has no local return
warn_failing_call             csv_util.erl:66: The call filelib:ensure_dir(TestPath::binary()) breaks the contract (Name) -> 'ok' | {'error',Reason} when is_subtype(Name,filename() | dirname()), is_subtype(Reason,file:posix())
warn_umatched_return          acdc_agent_listener.erl:414: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_agent_listener.erl:415: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_agent_listener.erl:560: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_agent_maintenance.erl:29: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_agent_maintenance.erl:48: Expression produces a value of type ['true'], but this value is unmatched
warn_umatched_return          acdc_agent_stats.erl:384: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:41: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:90: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:107: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:183: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:210: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:213: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:328: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_maintenance.erl:417: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_queue_handler.erl:95: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          acdc_stats.erl:627: Expression produces a value of type [any()], but this value is unmatched
warn_umatched_return          doodle_inbound_listener_sup.erl:41: Expression produces a value of type [{'error',_} | {'ok','undefined' | pid()} | {'ok','undefined' | pid(),_}], but this value is unmatched
warn_umatched_return          doodle_maintenance.erl:94: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          doodle_maintenance.erl:123: Expression produces a value of type ['ok'], but this value is unmatched
warn_umatched_return          blackhole_bindings.erl:154: Expression produces a value of type ['ok'], but this value is unmatched
warn_contract_syntax          blackhole_listener.erl:150: Overloaded contract has overlapping domains; such contracts are currently unsupported and are simply ignored
warn_umatched_return          cf_util.erl:762: Expression produces a value of type ['ok'], but this value is unmatched
k-anderson added a commit that referenced this pull request May 21, 2015
Kazoo 3689: fix some noisy dialyzer warnings
@k-anderson k-anderson merged commit c4734f9 into master May 21, 2015
@k-anderson k-anderson deleted the KAZOO-3689 branch May 21, 2015 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants