Skip to content

Specs for dialyzer#35

Open
ndiezel0 wants to merge 5 commits into
masterfrom
add_specs_v2
Open

Specs for dialyzer#35
ndiezel0 wants to merge 5 commits into
masterfrom
add_specs_v2

Conversation

@ndiezel0
Copy link
Copy Markdown
Collaborator

No description provided.

@ndiezel0 ndiezel0 requested review from WWWcool and nanodirijabl May 27, 2026 02:24
Comment thread apps/dmt/src/dmt_author.erl Outdated
insert(Name, Email) ->
dmt_author_database:insert(?POOL_NAME, Name, Email).

-spec get(author_id()) -> {ok, author()} | {error, author_not_found | term()}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а что за term?

Comment thread apps/dmt/src/dmt_author_database.erl Outdated
Comment on lines +24 to +27
author_id/0,
author/0,
email/0,
name/0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это не надо так делать - это транзитивно идет из dmt_author

Comment thread apps/dmt/src/dmt_author_database.erl Outdated
{error, author_not_found}
end.

-spec get_(worker(), author_id()) -> {ok, author()} | {error, author_not_found | term()}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и опять таки что а терм

-export([search_related_graph/8]).
-export([parse_entity_validation_error/1]).

-type worker() :: atom() | pid().
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

дублирование? тоже самое было в dmt_author_database

Comment thread apps/dmt/src/dmt_database.erl Outdated

-type worker() :: atom() | pid().
-type version() :: dmsl_domain_conf_v2_thrift:'Version'().
-type author_id() :: dmsl_domain_conf_v2_thrift:'AuthorID'().
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 вариант объявления этого типа - то есть уже вырисовывается общее замечание - проверить везде что у тебя есть условно один источник типа который дальше идет по всему коду

Comment thread apps/dmt/src/dmt_db_migration.erl Outdated

-define(DRIVER, epgsql).

-spec record_migration(up | down, epgsql:connection(), string()) ->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и тут

ok
end.

-spec if_ok(term() | [term()]) -> ok | {error, term()}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и тут возможно

Comment thread apps/dmt/src/dmt_mapper.erl Outdated
convert(_Type, Value) ->
Value.

-spec datetime_to_binary(calendar:datetime() | {calendar:date(), {0..23, 0..59, float()}}) ->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и тут

Comment thread apps/dmt/src/dmt_repository.erl Outdated
-export([get_multiple_related_graph/1]).
-export([search_related_graph/1]).

-type worker() :: atom() | pid().
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

опять повтор

Comment thread apps/dmt/src/dmt_repository.erl Outdated
Comment on lines +612 to +616
| {error,
{conflict, term()}
| {operation_error, dmt_domain:operation_error() | term()}
| author_not_found
| term()}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

чтобы такие партянки по месту не писать можно выносить наверх как ошибка коммита - это обсуждаемо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants