Skip to content

Commit

Permalink
Feature better -spec(_).s (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira authored Jun 30, 2024
1 parent a31b038 commit 0e04194
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion elvis.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[{config,
[#{dirs => ["src"],
filter => "*.erl",
ruleset => erl_files},
ruleset => erl_files_strict,
rules => [{elvis_style, no_macros, #{allow => ['ARIZONA_LIVEVIEW']}}]},
#{dirs => ["."],
filter => "rebar.config",
ruleset => rebar_config,
Expand Down
6 changes: 3 additions & 3 deletions src/arizona_example_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
-export([stop/1]).

-spec start(StartType, StartArgs) -> Started
when StartType :: normal,
StartArgs :: [],
when StartType :: application:start_type(),
StartArgs :: term(),
Started :: supervisor:startlink_ret().
start(_StartType, _StartArgs) ->
arizona_example_sup:start_link().

-spec stop(State) -> Stopped
when State :: [],
when State :: term(),
Stopped :: ok.
stop(_State) ->
ok.
4 changes: 2 additions & 2 deletions src/arizona_example_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).

-spec init(Args) -> Init
when Args :: [],
when Args :: term(),
Init :: {ok, {SupFlags, [ChildSpec]}},
SupFlags :: supervisor:sup_flags(),
ChildSpec :: supervisor:child_spec().
init([]) ->
init(_Args) ->
SupFlags = #{
strategy => one_for_all,
intensity => 0,
Expand Down

0 comments on commit 0e04194

Please sign in to comment.