summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-01-31Pleroma.Web.PleromaAPI.EmojiPackController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.PleromaAPI.EmojiFileController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-31Pleroma.Web.PleromaAPI.ChatController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.SearchController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.ScheduledActivityController: fix dialyzer errors ↵Mark Felder
with replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.PollController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.NotificationController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.MediaController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.ListController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.MastodonAPI.FollowRequestController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.UserController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.ReportController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.RelayController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.MediaProxyCacheController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.InviteController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.InstanceDocumentController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Pleroma.Web.AdminAPI.ConfigController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Phoenix.Endpoint.Cowboy2Handler does not existMark Felder
This should have always failed as it would not be an existing atom. Unclear how it worked since the upgrade to Phoenix 1.6.
2024-01-30Pleroma.Web.MastodonAPI.AccountController: fix dialyzer errors with ↵Mark Felder
replace_params: false
2024-01-30Merge branch 'dialyzer-fixes' into 'develop'feld
Dialyzer fixes, some reverts See merge request pleroma/pleroma!4049
2024-01-30Pleroma.Web.MastodonAPI.DomainBlockController: dialyzer fixes via ↵Mark Felder
:replace_params
2024-01-30Modify our CastAndValidate plug to include the new functionality provided by ↵Mark Felder
the :replace_params config option This allows us to configure Open API Spex to not overwrite the params with the casted versions which violates the Plug.Conn.t() contract https://github.com/open-api-spex/open_api_spex/issues/92 https://github.com/open-api-spex/open_api_spex/pull/425
2024-01-30Bump open_api_spexMark Felder
2024-01-30Revert "Pleroma.Web.AdminAPI.MediaProxyCacheController: dialyzer errors"Mark Felder
This reverts commit 8b02c858102232700826214ffb5d58e5b2f90edf.
2024-01-30Revert "Pleroma.Web.TwitterAPI.UtilController: dialyzer fixes"Mark Felder
This reverts commit 17f4251b19846401ca36ee31156294ec63de84ee.
2024-01-30Revert "Pleroma.Web.PleromaAPI.UserImportController: Dialyzer errors"Mark Felder
This reverts commit 52e18a624922e64eb4a7fd3f0d7a9aef06ea7fad.
2024-01-30Revert "Pleroma.Web.PleromaAPI.NotificationController: dialyzer errors"Mark Felder
This reverts commit 26a95e57873630491066687d2a216ab6e01549b0.
2024-01-30Revert "Pleroma.Web.AdminAPI.ConfigController: dialyzer error"Mark Felder
This reverts commit 60d89cb40455f9f70b683849dd95311975b0b6f7.
2024-01-30Revert "Pleroma.Web.PleromaAPI.MascotController: dialyzer errors"Mark Felder
This reverts commit 9c8055d4b3eeed04e2fc27b69e1bd2b8bae11bb8.
2024-01-30Revert "Pleroma.Web.PleromaAPI.EmojiPackController: dialyzer errors"Mark Felder
This reverts commit 77bf617c4b28fce84f268ca391fa4af6dd590c82.
2024-01-30Revert "Pleroma.Web.PleromaAPI.EmojiFileController: dialyzer errors"Mark Felder
This reverts commit dc912dc5909922f4100c6a56bec72a4bb9e0d5dc.
2024-01-30Revert "Pleroma.Web.PleromaAPI.ChatController: Dialyzer error"Mark Felder
This reverts commit 8d64eedbecec99d1ae19d300891a9c4cd3dbdf9d.
2024-01-30Revert "Pleroma.Web.AdminAPI.InviteController: dialyzer errors"Mark Felder
This reverts commit db87be126e707ffc84c0b6b598aa07a4b068e82a.
2024-01-30Revert "Pleroma.Web.AdminAPI.UserController: dialyzer errors"Mark Felder
This reverts commit d92c3d927d4134941dabef3e8f1b5209de115665.
2024-01-30Revert "Pleroma.Web.AdminAPI.RelayController: dialyzer errors"Mark Felder
This reverts commit 94838ed941494fb6132086aa2cb3b5e65a00b08c.
2024-01-30Revert "Pleroma.Web.AdminAPI.ReportController: dialyzer errors"Mark Felder
This reverts commit bfe626d5787ae546e2a96b8c4c621c09fea1332a.
2024-01-30Revert "Pleroma.Web.AdminAPI.InstanceDocumentController: fix dialyzer error"Mark Felder
This reverts commit a3024dd5ac28bc23a91b12fa15ab56d15c1c341d.
2024-01-30Revert "Pleroma.Web.MastodonAPI.AccountController: dialyzer errors"Mark Felder
This reverts commit e53c20b03c934c725726f49b2ca98b0bd9406bef.
2024-01-30Revert "Pleroma.Web.MastodonAPI.DomainBlockController: dialyzer errors"Mark Felder
This reverts commit 378edeaf159c0ff98780ad1b41f513992f1af305.
2024-01-30Revert "Pleroma.Web.MastodonAPI.MediaController: dialyzer errors"Mark Felder
This reverts commit 8cd527985780f6c9e4512f2e72f3dddbbf9b33ca.
2024-01-29Pleroma.Web.MediaProxy.MediaProxyController: dialyzer errorsMark Felder
lib/pleroma/web/media_proxy/media_proxy_controller.ex:55:no_return Function handle_preview/2 has no local return. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:59:call The function call will not succeed. Pleroma.HTTP.request(<<72, 69, 65, 68>>, _media_proxy_url :: any(), [], [], [{:pool, :media}]) will never return since the success typing is: ( :delete | :get | :head | :options | :patch | :post | :put | :trace, binary(), any(), [{binary(), binary()}], Keyword.t() ) :: any() and the contract is ( method(), Pleroma.HTTP.Request.url(), String.t(), Pleroma.HTTP.Request.headers(), :elixir.keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()} ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:95:unused_fun Function handle_preview/3 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:111:unused_fun Function handle_png_preview/2 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:134:unused_fun Function handle_jpeg_preview/2 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:152:unused_fun Function handle_video_preview/2 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:164:unused_fun Function drop_static_param_and_redirect/1 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:173:unused_fun Function fallback_on_preview_error/2 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:177:unused_fun Function put_preview_response_headers/1 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:177:unused_fun Function put_preview_response_headers/2 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:187:unused_fun Function thumbnail_max_dimensions/0 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:196:unused_fun Function min_content_length_for_preview/0 will never be called. ________________________________________________________________________________ lib/pleroma/web/media_proxy/media_proxy_controller.ex:200:unused_fun Function media_preview_proxy_config/0 will never be called.
2024-01-29Pleroma.Web.MastodonAPI.MediaController: dialyzer errorsMark Felder
lib/pleroma/web/mastodon_api/controllers/media_controller.ex:32:call The function call will not succeed. Phoenix.Controller.render( _conn :: %{ :assigns => %{:user => _, _ => _}, :body_params => %{:file => _, _ => _}, _ => _ }, <<97, 116, 116, 97, 99, 104, 109, 101, 110, 116, 46, 106, 115, 111, 110>>, %{:attachment => map()} ) will never return since the success typing is: ( %Plug.Conn{ :adapter => {atom(), _}, :assigns => %{atom() => _}, :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :halted => boolean(), :host => binary(), :method => binary(), :owner => pid(), :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :path_info => [binary()], :path_params => %{binary() => binary() | [any()] | map()}, :port => char(), :private => %{atom() => _}, :query_params => %Plug.Conn.Unfetched{ :aspect => atom(), binary() => binary() | [any()] | map() }, :query_string => binary(), :remote_ip => {byte(), byte(), byte(), byte()} | {char(), char(), char(), char(), char(), char(), char(), char()}, :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()}, :req_headers => [{_, _}], :request_path => binary(), :resp_body => nil | binary() | maybe_improper_list( binary() | maybe_improper_list(any(), binary() | []) | byte(), binary() | [] ), :resp_cookies => %{binary() => map()}, :resp_headers => [{_, _}], :scheme => :http | :https, :script_name => [binary()], :secret_key_base => nil | binary(), :state => :chunked | :file | :sent | :set | :set_chunked | :set_file | :unset | :upgraded, :status => nil | non_neg_integer() }, atom() | binary(), atom() | binary() | [{_, _}] | map() ) :: %Plug.Conn{ :adapter => {atom(), _}, :assigns => %{atom() => _}, :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :halted => boolean(), :host => binary(), :method => binary(), :owner => pid(), :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :path_info => [binary()], :path_params => %{binary() => binary() | [any()] | map()}, :port => char(), :private => %{atom() => _}, :query_params => %Plug.Conn.Unfetched{ :aspect => atom(), binary() => binary() | [any()] | map() }, :query_string => binary(), :remote_ip => {byte(), byte(), byte(), byte()} | {char(), char(), char(), char(), char(), char(), char(), char()}, :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()}, :req_headers => [{_, _}], :request_path => binary(), :resp_body => nil | binary() | maybe_improper_list( binary() | maybe_improper_list(any(), binary() | []) | byte(), binary() | [] ), :resp_cookies => %{binary() => map()}, :resp_headers => [{_, _}], :scheme => :http | :https, :script_name => [binary()], :secret_key_base => nil | binary(), :state => :sent, :status => nil | non_neg_integer() } and the contract is (Plug.Conn.t(), binary() | atom(), Keyword.t() | map()) :: Plug.Conn.t() ________________________________________________________________________________ lib/pleroma/web/mastodon_api/controllers/media_controller.ex:48:call The function call will not succeed. Plug.Conn.put_status( _conn :: %{ :assigns => %{:user => _, _ => _}, :body_params => %{:file => _, _ => _}, _ => _ }, 202 ) breaks the contract (t(), status()) :: t() ________________________________________________________________________________ lib/pleroma/web/mastodon_api/controllers/media_controller.ex:63:call The function call will not succeed. Phoenix.Controller.render( _conn :: %{ :assigns => %{:user => _, _ => _}, :body_params => %{:description => _, _ => _}, _ => _ }, <<97, 116, 116, 97, 99, 104, 109, 101, 110, 116, 46, 106, 115, 111, 110>>, %{:attachment => map()} ) will never return since the success typing is: ( %Plug.Conn{ :adapter => {atom(), _}, :assigns => %{atom() => _}, :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :halted => boolean(), :host => binary(), :method => binary(), :owner => pid(), :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :path_info => [binary()], :path_params => %{binary() => binary() | [any()] | map()}, :port => char(), :private => %{atom() => _}, :query_params => %Plug.Conn.Unfetched{ :aspect => atom(), binary() => binary() | [any()] | map() }, :query_string => binary(), :remote_ip => {byte(), byte(), byte(), byte()} | {char(), char(), char(), char(), char(), char(), char(), char()}, :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()}, :req_headers => [{_, _}], :request_path => binary(), :resp_body => nil | binary() | maybe_improper_list( binary() | maybe_improper_list(any(), binary() | []) | byte(), binary() | [] ), :resp_cookies => %{binary() => map()}, :resp_headers => [{_, _}], :scheme => :http | :https, :script_name => [binary()], :secret_key_base => nil | binary(), :state => :chunked | :file | :sent | :set | :set_chunked | :set_file | :unset | :upgraded, :status => nil | non_neg_integer() }, atom() | binary(), atom() | binary() | [{_, _}] | map() ) :: %Plug.Conn{ :adapter => {atom(), _}, :assigns => %{atom() => _}, :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :halted => boolean(), :host => binary(), :method => binary(), :owner => pid(), :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :path_info => [binary()], :path_params => %{binary() => binary() | [any()] | map()}, :port => char(), :private => %{atom() => _}, :query_params => %Plug.Conn.Unfetched{ :aspect => atom(), binary() => binary() | [any()] | map() }, :query_string => binary(), :remote_ip => {byte(), byte(), byte(), byte()} | {char(), char(), char(), char(), char(), char(), char(), char()}, :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()}, :req_headers => [{_, _}], :request_path => binary(), :resp_body => nil | binary() | maybe_improper_list( binary() | maybe_improper_list(any(), binary() | []) | byte(), binary() | [] ), :resp_cookies => %{binary() => map()}, :resp_headers => [{_, _}], :scheme => :http | :https, :script_name => [binary()], :secret_key_base => nil | binary(), :state => :sent, :status => nil | non_neg_integer() } and the contract is (Plug.Conn.t(), binary() | atom(), Keyword.t() | map()) :: Plug.Conn.t()
2024-01-29Pleroma.Web.MastodonAPI.DomainBlockController: dialyzer errorsMark Felder
lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex:32:call The function call will not succeed. Phoenix.Controller.json( _conn :: %{ :assigns => %{:user => _, _ => _}, :body_params => %{:domain => _, _ => _}, _ => _ }, %{} ) breaks the contract (Plug.Conn.t(), term()) :: Plug.Conn.t() ________________________________________________________________________________ lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex:43:call The function call will not succeed. Phoenix.Controller.json( _conn :: %{ :assigns => %{:user => _, _ => _}, :body_params => %{:domain => _, _ => _}, _ => _ }, %{} ) breaks the contract (Plug.Conn.t(), term()) :: Plug.Conn.t()
2024-01-29Pleroma.Web.MastodonAPI.StatusView: dialyzer errorMark Felder
lib/pleroma/web/mastodon_api/views/status_view.ex:799:pattern_match_cov The pattern _, _ can never match, because previous clauses completely cover the type %URI{ :authority => URI.authority(), :fragment => nil | binary(), :host => nil | binary(), :path => nil | binary(), :port => nil | char(), :query => nil | binary(), :scheme => nil | binary(), :userinfo => nil | binary() }, %URI{ :authority => URI.authority(), :fragment => nil | binary(), :host => nil | binary(), :path => nil | binary(), :port => nil | char(), :query => nil | binary(), :scheme => nil | binary(), :userinfo => nil | binary() } .
2024-01-29Pleroma.User: dialyzer errorsMark Felder
lib/pleroma/user.ex:757:no_return Function register_changeset/1 has no local return. ________________________________________________________________________________ lib/pleroma/user.ex:757:no_return Function register_changeset/2 has no local return. ________________________________________________________________________________ lib/pleroma/user.ex:757:no_return Function register_changeset/3 has no local return. ________________________________________________________________________________ lib/pleroma/user.ex:778:call The function call will not succeed. Pleroma.User.approval_changeset( %Ecto.Changeset{ :action => atom(), :changes => %{atom() => _}, :constraints => [ %{ :constraint => binary() | %Regex{ :opts => binary() | [any()], :re_pattern => _, :re_version => _, :source => binary() }, :error_message => binary(), :error_type => atom(), :field => atom(), :match => :exact | :prefix | :suffix, :type => :check | :exclusion | :foreign_key | :unique } ], :data => nil | map(), :empty_values => _, :errors => Keyword.t({binary(), Keyword.t()}), :filters => %{atom() => _}, :params => nil | %{binary() => _}, :prepare => [(_ -> any())], :repo => atom(), :repo_opts => Keyword.t(), :required => [atom()], :types => nil | %{ atom() => atom() | {:array | :assoc | :embed | :in | :map | :maybe | :param, _} | {:parameterized, atom(), _} }, :valid? => boolean(), :validations => Keyword.t() }, [{:set_approval, _}, ...] ) breaks the contract (t(), :elixir.keyword()) :: Ecto.Changeset.t() ________________________________________________________________________________ lib/pleroma/user.ex:854:unused_fun Function maybe_validate_required_birthday/1 will never be called.
2024-01-29API Specs: many dialyzer errorsMark Felder
Too many to include in a commit log Module instead of schema was being passed
2024-01-29Pleroma.Web.ControllerHelper: dialyzer errorMark Felder
lib/pleroma/web/controller_helper.ex:97:pattern_match The pattern can never match the type. Pattern: nil Type: %Plug.Conn{ :adapter => {atom(), _}, :assigns => %{atom() => _}, :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :halted => boolean(), :host => binary(), :method => binary(), :owner => pid(), :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _}, :path_info => [binary()], :path_params => %{ binary() => binary() | [binary() | [any()] | %{binary() => _}] | %{binary() => binary() | [any()] | %{binary() => _}} }, :port => char(), :private => %{atom() => _}, :query_params => %Plug.Conn.Unfetched{ :aspect => atom(), binary() => binary() | [binary() | [any()] | %{binary() => _}] | %{binary() => binary() | [any()] | %{binary() => _}} }, :query_string => binary(), :remote_ip => {byte(), byte(), byte(), byte()} | {char(), char(), char(), char(), char(), char(), char(), char()}, :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()}, :req_headers => [{binary(), binary()}], :request_path => binary(), :resp_body => nil | binary() | maybe_improper_list( binary() | maybe_improper_list(any(), binary() | []) | byte(), binary() | [] ), :resp_cookies => %{binary() => map()}, :resp_headers => [{binary(), binary()}], :scheme => :http | :https, :script_name => [binary()], :secret_key_base => nil | binary(), :state => :sent, :status => nil | non_neg_integer() }
2024-01-29Merge branch 'deps-bump' into 'develop'Haelwenn
Bump dependencies See merge request pleroma/pleroma!4044
2024-01-28Merge branch 'dialyzer-fixes' into 'develop'feld
More dialyzer fixes See merge request pleroma/pleroma!4048
2024-01-28Pleroma.Web.MastodonAPI.DirectoryController: dialyzer errorsMark Felder
lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:6:unused_fun Function skip_auth/2 will never be called. ________________________________________________________________________________ lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:6:unused_fun Function skip_plug/2 will never be called. ________________________________________________________________________________ lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:18:guard_fail The guard clause: when _action :: atom() == <<105, 110, 100, 101, 120>> can never succeed.