CDS-93: Enable dialyzer rule (#8)

* CDS-93: Enable dialyzer rule

* CDS-93: Type fix
This commit is contained in:
ndiezel0 2019-07-16 19:55:35 +03:00 committed by GitHub
parent bc05d3dd63
commit bbbf99db96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View File

@ -19,11 +19,11 @@
-define(STATEM, ?MODULE).
-record(data, {
num,
threshold,
keyring,
shares = #{},
timer
num :: pos_integer() | undefined,
threshold :: pos_integer() | undefined,
keyring :: encrypted_keyring() | undefined,
shares = #{} :: masterkey_shares_map(),
timer :: reference() | undefined
}).
-type shareholder_id() :: kds_shareholder:shareholder_id().

View File

@ -21,12 +21,12 @@
-define(STATEM, ?MODULE).
-record(data, {
threshold,
validation_keyring,
shareholders,
confirmation_shares = #{},
validation_shares = #{},
timer
threshold :: pos_integer() | undefined,
validation_keyring :: encrypted_keyring() | undefined,
shareholders :: kds_shareholder:shareholders() | undefined,
confirmation_shares = #{} :: masterkey_shares(),
validation_shares = #{} :: masterkey_shares(),
timer :: reference() | undefined
}).
-type shareholder_id() :: kds_shareholder:shareholder_id().

View File

@ -29,8 +29,8 @@
-type masterkey_shares() :: [masterkey_share()].
-type masterkey_shares_map() :: #{share_id() => {shareholder_id(), masterkey_share()}}.
-type signed_masterkey_share() :: binary().
-type share_id() :: byte().
-type threshold() :: byte().
-type share_id() :: pos_integer().
-type threshold() :: pos_integer().
-type share() :: #share{
threshold :: threshold(),
x :: share_id(),

View File

@ -4,7 +4,7 @@
warnings_as_errors,
warn_export_all,
warn_missing_spec,
% warn_untyped_record, %% FIXME shamir.hrl share record is broken
warn_untyped_record,
warn_export_vars,
warn_unused_record,
warn_bif_clash,

View File

@ -64,7 +64,7 @@
0},
{<<"shamir">>,
{git,"git@github.com:rbkmoney/shamir.git",
{ref,"5ca10a87514d4a128f4c8d8cccfd68020697733b"}},
{ref,"8ac011408f20891dddecedf15243109bdf479725"}},
0},
{<<"snowflake">>,
{git,"https://github.com/rbkmoney/snowflake.git",