Skip to content

Commit

Permalink
Fixed elvis warnings and bumped rebar3 version to 3.19.0 for the CI (#52
Browse files Browse the repository at this point in the history
)

* 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
  • Loading branch information
tak30 committed Jul 11, 2022
1 parent 579f0a2 commit ba45620
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:

strategy:
matrix:
otp: ['23.3']
rebar: ['3.16.1']
otp: ['23.3', '24.3']
rebar: ['3.19.0']

steps:
- uses: actions/checkout@v2
Expand Down
12 changes: 4 additions & 8 deletions src/erlmld_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-behaviour(application).

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

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

ensure_all_started() ->
ensure_all_deps_started() ->
{ok, Deps} = application:get_key(erlmld, applications),
{ok,
lists:append([begin
{ok, Started} = application:ensure_all_started(Dep),
Started
end
|| Dep <- Deps])}.
lists:foreach(fun(Dep) -> {ok, _} = application:ensure_all_started(Dep) end, Deps),
ok.
3 changes: 3 additions & 0 deletions src/erlmld_wrk_statem.erl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
%%%-------------------------------------------------------------------
-module(erlmld_wrk_statem).

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

-behaviour(gen_statem).

%% API
Expand Down

0 comments on commit ba45620

Please sign in to comment.