Specs for dialyzer#35
Open
ndiezel0 wants to merge 5 commits into
Open
Conversation
WWWcool
reviewed
May 28, 2026
| insert(Name, Email) -> | ||
| dmt_author_database:insert(?POOL_NAME, Name, Email). | ||
|
|
||
| -spec get(author_id()) -> {ok, author()} | {error, author_not_found | term()}. |
Comment on lines
+24
to
+27
| author_id/0, | ||
| author/0, | ||
| email/0, | ||
| name/0 |
Contributor
There was a problem hiding this comment.
это не надо так делать - это транзитивно идет из dmt_author
| {error, author_not_found} | ||
| end. | ||
|
|
||
| -spec get_(worker(), author_id()) -> {ok, author()} | {error, author_not_found | term()}. |
| -export([search_related_graph/8]). | ||
| -export([parse_entity_validation_error/1]). | ||
|
|
||
| -type worker() :: atom() | pid(). |
Contributor
There was a problem hiding this comment.
дублирование? тоже самое было в dmt_author_database
|
|
||
| -type worker() :: atom() | pid(). | ||
| -type version() :: dmsl_domain_conf_v2_thrift:'Version'(). | ||
| -type author_id() :: dmsl_domain_conf_v2_thrift:'AuthorID'(). |
Contributor
There was a problem hiding this comment.
3 вариант объявления этого типа - то есть уже вырисовывается общее замечание - проверить везде что у тебя есть условно один источник типа который дальше идет по всему коду
|
|
||
| -define(DRIVER, epgsql). | ||
|
|
||
| -spec record_migration(up | down, epgsql:connection(), string()) -> |
| ok | ||
| end. | ||
|
|
||
| -spec if_ok(term() | [term()]) -> ok | {error, term()}. |
| convert(_Type, Value) -> | ||
| Value. | ||
|
|
||
| -spec datetime_to_binary(calendar:datetime() | {calendar:date(), {0..23, 0..59, float()}}) -> |
| -export([get_multiple_related_graph/1]). | ||
| -export([search_related_graph/1]). | ||
|
|
||
| -type worker() :: atom() | pid(). |
Comment on lines
+612
to
+616
| | {error, | ||
| {conflict, term()} | ||
| | {operation_error, dmt_domain:operation_error() | term()} | ||
| | author_not_found | ||
| | term()}. |
Contributor
There was a problem hiding this comment.
чтобы такие партянки по месту не писать можно выносить наверх как ошибка коммита - это обсуждаемо
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.