Skip to content

Commit ba45620

Browse files
authored
Fixed elvis warnings and bumped rebar3 version to 3.19.0 for the CI (#52)
* Fixed elvis warnings and bumped rebar3 version to 3.19.0 for the CI * Changed function ensure_all_started as it was returning something not useful
1 parent 579f0a2 commit ba45620

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.github/workflows/erlang.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
otp: ['23.3']
14-
rebar: ['3.16.1']
13+
otp: ['23.3', '24.3']
14+
rebar: ['3.19.0']
1515

1616
steps:
1717
- uses: actions/checkout@v2

src/erlmld_app.erl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
-behaviour(application).
44

5-
-export([start/2, stop/1, ensure_all_started/0]).
5+
-export([start/2, stop/1, ensure_all_deps_started/0]).
66

77
%% application callback. load default configuration from application environment, and
88
%% start erlmd_sup with that configuration.
@@ -15,11 +15,7 @@ start(_StartType, []) ->
1515
stop(_State) ->
1616
ok.
1717

18-
ensure_all_started() ->
18+
ensure_all_deps_started() ->
1919
{ok, Deps} = application:get_key(erlmld, applications),
20-
{ok,
21-
lists:append([begin
22-
{ok, Started} = application:ensure_all_started(Dep),
23-
Started
24-
end
25-
|| Dep <- Deps])}.
20+
lists:foreach(fun(Dep) -> {ok, _} = application:ensure_all_started(Dep) end, Deps),
21+
ok.

src/erlmld_wrk_statem.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@
103103
%%%-------------------------------------------------------------------
104104
-module(erlmld_wrk_statem).
105105

106+
%% The usage of throw here is intentional because gen_statem knows how to handle throws
107+
-elvis([{elvis_style, no_throw, disable}]).
108+
106109
-behaviour(gen_statem).
107110

108111
%% API

0 commit comments

Comments
 (0)