Skip to content

Commit 1b87e8d

Browse files
[RTI-13896] Add more dialyzer checks (#109)
* [RTI-13896] Add more dialyzer checks * [RTI-13896] Remove old OTP versions from CI
1 parent 394828d commit 1b87e8d

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{deps, [{dynamic_compile, "1.0.0"}]}.
1111

1212
{dialyzer,
13-
[{warnings, [no_return, error_handling]},
13+
[{warnings, [no_return, error_handling, missing_return, extra_return]},
1414
{plt_apps, top_level_deps},
1515
{plt_extra_apps, [crypto, dynamic_compile]},
1616
{plt_location, local},

src/mero_cluster_sup.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
%%%===================================================================
3838

3939
%% @doc: Starts a list of workers with the provided configuration
40-
-spec start_link(ClusterName :: atom()) -> {ok, Pid :: pid()} | {error, Reason :: term()}.
40+
-spec start_link(ClusterName :: atom()) ->
41+
{ok, Pid :: pid()} | ignore | {error, Reason :: term()}.
4142
start_link(ClusterName) ->
4243
SupName = mero_cluster:sup_by_cluster_name(ClusterName),
4344
PoolDefs = mero_cluster:child_definitions(ClusterName),

src/mero_conf_monitor.erl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
%%%-----------------------------------------------------------------------------
4646
%%% API
4747
%%%-----------------------------------------------------------------------------
48-
-spec start_link(cluster_config()) -> {ok, pid()} | {error, term()}.
48+
-spec start_link(cluster_config()) -> {ok, pid()} | ignore | {error, term()}.
4949
start_link(OrigConfig) ->
5050
gen_server:start_link({local, ?MODULE}, ?MODULE, #{orig_config => OrigConfig}, []).
5151

@@ -81,7 +81,8 @@ handle_continue(program_heartbeat, State) ->
8181
program_heartbeat(),
8282
{noreply, State}.
8383

84-
-spec handle_info(heartbeat | _, State) -> {noreply, State} when State :: state().
84+
-spec handle_info(heartbeat | _, state()) ->
85+
{noreply, state()} | {noreply, state(), {continue, reload}}.
8586
handle_info(heartbeat, State) ->
8687
{noreply, State, {continue, reload}};
8788
handle_info(_, State) ->

src/mero_sup.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343

4444
%% @doc: Starts a list of workers with the configuration generated on
4545
%% mero_cluster
46-
-spec start_link(mero:cluster_config()) -> {ok, Pid :: pid()} | {error, Reason :: term()}.
46+
-spec start_link(mero:cluster_config()) ->
47+
{ok, Pid :: pid()} | ignore | {error, Reason :: term()}.
4748
start_link(OrigConfig) ->
4849
supervisor:start_link({local, ?MODULE}, ?MODULE, #{orig_config => OrigConfig}).
4950

0 commit comments

Comments
 (0)