summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-01-27FormattingMark Felder
2024-01-26Pleroma.Helpers.QtFastStart: Dialzyer errorMark Felder
lib/pleroma/helpers/qt_fast_start.ex:129:improper_list_constr List construction (cons) will produce an improper list, because its second argument is <<_::32>>. lib/pleroma/helpers/qt_fast_start.ex:129:improper_list_constr List construction (cons) will produce an improper list, because its second argument is <<_::64>>.
2024-01-26Pleroma.ModerationLog: fix invalid typeMark Felder
2024-01-26Pleroma.Search.SearchBackend: dialyzer errorMark Felder
Incorrect spec. Both search backends return :ok so that is what should be the spec. lib/pleroma/search/database_search.ex:56:callback_type_mismatch Type mismatch for @callback remove_from_index/1 in Pleroma.Search.SearchBackend behaviour. Expected type: {:error, _} | {:ok, _} Actual type: :ok
2024-01-26Pleroma.Signature: dialyzer errorMark Felder
lib/pleroma/signature.ex:30:pattern_match The pattern can never match the type. Pattern: %{<<97, 112, 95, 105, 100>> => _ap_id} Type: {:error, _} | {:ok, map()}
2024-01-26Pleroma.Upload: dialyzer errorMark Felder
I have opted to set this to :upper as this retains the same behavior but clears up the error. lib/pleroma/upload.ex:178:call The function call will not succeed. Base.encode16(binary(), [{:lower, true}]) breaks the contract (binary(), [{:case, encode_case()}]) :: binary()
2024-01-26RichMedia.Parser.TTL.AwsSignedUrl: dialyzer fixMark Felder
lib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex:9:callback_type_mismatch Type mismatch for @callback ttl/2 in Pleroma.Web.RichMedia.Parser.TTL behaviour. Expected type: nil | integer() Actual type: {:error, <<_::64, _::size(8)>>} | {:ok, integer()}
2024-01-26TwitterAPI.UtilController: fix dialyzer errorsMark Felder
lib/pleroma/web/twitter_api/controllers/util_controller.ex:300:pattern_match The pattern can never match the type. Pattern: {:error, :no_such_alias} Type: {:not_found, nil} lib/pleroma/web/twitter_api/controllers/util_controller.ex:304:pattern_match The pattern can never match the type. Pattern: {:error, _error} Type: {:not_found, nil}
2024-01-26Credo.Check.Readability.PredicateFunctionNamesMark Felder
This check was recently improved in Credo and it does make sense for readability. The offending functions in Pleroma have been renamed and a couple missing the ? suffix have been fixed as well.
2024-01-26InetCidr.parse/2 is deprecatedMark Felder
2024-01-26Transmogrifier: Cleanup obsolete handling of `"contentMap": null`Haelwenn (lanodan) Monnier
2024-01-26CommonFixes: Use Maps.filter_empty_values on fix_object_defaultsHaelwenn (lanodan) Monnier
2024-01-26Maps: Add filter_empty_values/1Haelwenn (lanodan) Monnier
2024-01-22MastodonAPI.Controller.StatusController: fix dialyzer errorMark Felder
lib/pleroma/web/mastodon_api/controllers/status_controller.ex:333:pattern_match The pattern can never match the type. Pattern: {:ok, _activity} Type: {:error, _}
2024-01-22MRF.KeywordPolicy: fix dialyzer errorMark Felder
lib/pleroma/web/activity_pub/mrf/keyword_policy.ex:13:neg_guard_fail Guard test: not is_binary(_string :: binary()) can never succeed.
2024-01-22MRF.HashtagPolicy: fix dialyzer errorMark Felder
lib/pleroma/web/activity_pub/mrf/hashtag_policy.ex:87:exact_eq The test <<_::32>> == <<_::48>> can never evaluate to 'true'.
2024-01-22MRF.InlineQuotePolicy: fix dialyzer errorMark Felder
lib/pleroma/web/activity_pub/mrf/inline_quote_policy.ex:60:callback_type_mismatch Type mismatch for @callback config_description/0 in Pleroma.Web.ActivityPub.MRF.Policy behaviour. Expected type: %{ :description => binary(), :key => atom(), :label => binary(), :related_policy => binary(), :children => [map()] } Actual type: %{ :children => [ %{ :description => <<_::808>>, :key => :template, :suggestions => [any(), ...], :type => :string }, ... ], :description => <<_::336>>, :key => :mrf_inline_quote, :label => <<_::184>>, :related_policy => <<_::360>>, :type => :group }
2024-01-22Pleroma.Migrators.Support.BaseMigrator: Fix dialyzer errorsMark Felder
lib/pleroma/migrators/context_objects_deletion_migrator.ex:13:exact_eq The test :error | float() == 0 can never evaluate to 'true'. lib/pleroma/migrators/hashtags_table_migrator.ex:13:exact_eq The test :error | float() == 0 can never evaluate to 'true'.
2024-01-22Pleroma.Gun.ConnectionPool.WorkerSupervisor: fix dialyzer errorMark Felder
lib/pleroma/gun/connection_pool/worker_supervisor.ex:24:guard_fail The guard clause: when _ :: true === nil can never succeed.
2024-01-22Pleroma.HTTP.AdapterHelper: fix dialyzer errorsMark Felder
lib/pleroma/http/adapter_helper.ex:18:unknown_type Unknown type: Connection.host/0. lib/pleroma/http/adapter_helper.ex:19:unknown_type Unknown type: Connection.host/0. lib/pleroma/http/adapter_helper.ex:19:unknown_type Unknown type: Connection.proxy_type/0.
2024-01-22Pleroma.Migrators.Support.BaseMigratorState: fix dialyzer errorMark Felder
lib/pleroma/migrators/support/base_migrator_state.ex:10:unknown_type Unknown type: Pleroma.DataMigration.t/0.
2024-01-22Pleroma.Web.ActivityPub.Builder: fix dialyzer errorMark Felder
lib/pleroma/web/activity_pub/builder.ex:205:unknown_type Unknown type: Pleroma.Web.CommonAPI.ActivityDraft.t/0.
2024-01-22Pleroma.Web.ActivityPub.Builder: fix dialyzer errorsMark Felder
lib/pleroma/web/activity_pub/builder.ex:35:unknown_type Unknown type: Activity.t/0. lib/pleroma/web/activity_pub/builder.ex:40:unknown_type Unknown type: Activity.t/0. lib/pleroma/web/activity_pub/builder.ex:144:unknown_type Unknown type: Activity.t/0. ________________________________________________________________________________ lib/pleroma/web/activity_pub/builder.ex:204:unknown_type Unknown type: Pleroma.Web.CommonAPI.ActivityDraft.t/0.
2024-01-22Pleroma.User.Query: fix dialyzer errorMark Felder
lib/pleroma/user/query.ex:74:unknown_type Unknown type: Query.t/0.
2024-01-22Pleroma.User: fix dialyzer errorsMark Felder
lib/pleroma/user.ex:1514:unknown_type Unknown type: Pleroma.UserRelationship.t/0. lib/pleroma/user.ex:2629:unknown_type Unknown type: Pleroma.UserRelationship.t/0. lib/pleroma/user.ex:2638:unknown_type Unknown type: Pleroma.UserRelationship.t/0.
2024-01-22Pleroma.User.Backup: fix some dialyzer errorsMark Felder
lib/pleroma/user/backup.ex:207:call The function call will not succeed. :zip.create( string(), [:"\"actor.json\"", :"\"outbox.json\"", :"\"likes.json\"", :"\"bookmarks.json\""], [{:cwd, binary()}, ...] ) will never return since the success typing is: ( atom() | [atom() | [any()] | char()], [ atom() | [atom() | [any()] | char()] | {atom() | [atom() | [any()] | char()], binary()} | {atom() | [atom() | [any()] | char()], binary(), {:file_info, :undefined | non_neg_integer(), :device | :directory | :other | :regular | :symlink | :undefined, :none | :read | :read_write | :undefined | :write, :undefined | non_neg_integer() | {_, _}, :undefined | non_neg_integer() | {_, _}, :undefined | non_neg_integer() | {_, _}, :undefined | non_neg_integer(), :undefined | non_neg_integer(), :undefined | non_neg_integer(), :undefined | non_neg_integer(), :undefined | non_neg_integer(), :undefined | non_neg_integer(), :undefined | non_neg_integer()}} ], [ :cooked | :memory | :verbose | {:comment, string()} | {:compress, :all | [[any()]] | {:add, [any()]} | {:del, [any()]}} | {:cwd, string()} | {:uncompress, :all | [[any()]] | {:add, [any()]} | {:del, [any()]}} ] ) :: {:error, _} | {:ok, atom() | [atom() | [any()] | char()] | {atom() | [atom() | [any()] | char()], binary()}} and the contract is (name, fileList, options) :: retValue when name: :file.name(), fileList: [:FileSpec], fileSpec: :file.name() | {:file.name(), binary()} | {:file.name(), binary(), :file.file_info()}, options: [:Option], option: create_option(), retValue: {:ok, FileName :: filename()} | {:ok, {FileName :: filename(), binary()}} | {:error, Reason :: term()}
2024-01-22Announcement: fix dialyzer errors and add typespec for the changesetMark Felder
It was possible for this to raise (no_local_return) because the data key could be missing from the params
2024-01-22Use config to control inclusion of test emojiMark Felder
2024-01-22Use config to determine sending to the streamer registry instead of MIX_ENV ↵Mark Felder
compile time function definition
2024-01-22Use config to control Uploader callback timeoutMark Felder
2024-01-22Replace custom fifo implementation with ExileMark Felder
This is for streaming media to ffmpeg thumbnailer. The existing implementation relies on undocumented behavior. Erlang open_port/2 does not officially support passing a string of a file path for opening. The specs clearly state you are to provide one of the following for open_port/2: {spawn, Command :: string() | binary()} | {spawn_driver, Command :: string() | binary()} | {spawn_executable, FileName :: file:name_all()} | {fd, In :: integer() >= 0, Out :: integer() >= 0} Our method technically works but is strongly discouraged as it can block the scheduler and dialyzer throws errors as it recognizes we're breaking the contract and some of the functions we wrote may never return. This is indirectly covered by the Erlang FAQ section "9.12 Why can't I open devices (e.g. a serial port) like normal files?" https://www.erlang.org/faq/problems#idm1127
2024-01-21formatmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-01-21Merge branch 'develop' into 'public-polls'Haelwenn
# Conflicts: # docs/development/API/differences_in_mastoapi_responses.md
2024-01-20CredoMark Felder
2024-01-20Use config to control starting all HTTP pools in test envMark Felder
2024-01-20Use config to control streamer registryMark Felder
2024-01-20Use config to control background migratorsMark Felder
2024-01-20Use config to control loading of custom modulesMark Felder
2024-01-20Use config to control max_restartsMark Felder
2024-01-20Dialyzer: fix pattern match coverageMark Felder
2024-01-20Dialyzer: fix pattern match coverageMark Felder
2024-01-20Dialyzer: remove function that will never matchMark Felder
2024-01-20Fix typo in typespecMark Felder
2024-01-20Fix incorrect type definition for maybe_direct_follow/2Mark Felder
2024-01-20Fix invalid typesMark Felder
2024-01-20Fix invalid typeMark Felder
lib/pleroma/web/auth/authenticator.ex:8:unknown_type Unknown type: User.t/0.
2024-01-20Fix invalid typeMark Felder
lib/pleroma/web/activity_pub/publisher.ex:31:unknown_type Unknown type: Map.t/0.
2024-01-20Fix invalid typesMark Felder
lib/pleroma/web/activity_pub/mrf/policy.ex:6:unknown_type Unknown type: Map.t/0. lib/pleroma/web/activity_pub/mrf/policy.ex:7:unknown_type Unknown type: Map.t/0.
2024-01-20Fix invalid typeMark Felder
lib/pleroma/uploaders/uploader.ex:43:unknown_type Unknown type: Map.t/0.
2024-01-20Fix invalid typeMark Felder
lib/pleroma/upload.ex:89:unknown_type Unknown type: Map.t/0.