You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running Dialyzer and common tests on the current ejabberd codebase, I encountered several warnings and test failures. The following are the details of the issues:
Dialyzer Warnings
File: src/ejabberd_sip.erl
1. Line 37 Column 1: Function accept/1 has no local return
2. Line 39 Column 1: Function listen_options/0 has no local return
3. Line 41 Column 1: Function start/3 has no local return
4. Line 43 Column 1: Function start_link/3 has no local return
File: src/mod_avatar.erl
1. Line 107 Column 2: The pattern {'ok', MimeType, Data} can never match the type 'pass' | {'error','too_many_requests' | 'unsupported_format'}
2. Line 284 Column 5: The pattern {'ok', ImgInfo} can never match the type {'error','too_many_requests' | 'unsupported_format'}
3. Line 349 Column 3: The pattern {'ok', NewData} can never match the type {'error','too_many_requests' | 'unsupported_format'}
4. Line 434 Column 1: Function encode_mime_type/1 will never be called
5. Line 441 Column 2: The variable Formats can never match since previous clauses completely covered the type []
File: src/mod_http_upload.erl
1. Line 191 Column 5: The pattern [_ | _] can never match the type []
2. Line 544 Column 3: The pattern {'ok', Headers, OutData} can never match the type {'error',_}
3. Line 1001 Column 3: The pattern {'ok', Data, MediaInfo} can never match the type 'pass'
4. Line 1111 Column 3: The pattern {'ok', Info} can never match the type {'error','too_many_requests' | 'unsupported_format'}
5. Line 1130 Column 1: Function convert/2 will never be called
6. Line 1164 Column 1: Function thumb_el/2 will never be called
ejabberd has optional features, some of them disabled by default. But Dialyzer obviously checks all the code, even the one that depends on features that may be disabled by default.
For that reason, if you plan to run xref, dialyzer, tests... you should enable all the features:
When running Dialyzer and common tests on the current ejabberd codebase, I encountered several warnings and test failures. The following are the details of the issues:
Dialyzer Warnings
File: src/ejabberd_sip.erl
File: src/mod_avatar.erl
File: src/mod_http_upload.erl
Common Test Failures
Command: rebar3 ct
Output:
Steps to Reproduce
Environment
Expected Behavior
Dialyzer should pass without warnings, and all tests should pass without failures or unexpected skips.
The text was updated successfully, but these errors were encountered: