Skip to content

Commit

Permalink
[AUTO] Update Dependencies (#308)
Browse files Browse the repository at this point in the history
* Update dependencies

* Fix Elvis warnings

Co-authored-by: Brujo Benavides <[email protected]>
  • Loading branch information
adroll-rtb-ci and elbrujohalcon authored Jun 7, 2022
1 parent a467bcc commit 59b7f8f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
{project_plugins,
[{rebar3_hex, "~> 7.0.1"},
{rebar3_hank, "~> 1.3.0"},
{rebar3_lint, "~> 1.0.2"},
{rebar3_lint, "~> 1.1.0"},
{rebar3_sheldon, "~> 0.4.2"},
{rebar3_ex_doc, "~> 0.2.9"}]}.
{rebar3_ex_doc, "~> 0.2.11"}]}.

{dialyzer, [{warnings, [no_return, unmatched_returns, error_handling, underspecs]}]}.

Expand Down
5 changes: 4 additions & 1 deletion src/formatters/default_formatter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ lay_bit_types([T | Ts], Ctxt) ->
beside(lay(T, Ctxt), beside(lay_text_float("-"), lay_bit_types(Ts, Ctxt))).

lay_error_info({L, M, T} = T0, Ctxt) when is_integer(L), is_atom(M) ->
case catch apply(M, format_error, [T]) of
try apply(M, format_error, [T]) of
S when is_list(S) ->
case L > 0 of
true ->
Expand All @@ -1288,6 +1288,9 @@ lay_error_info({L, M, T} = T0, Ctxt) when is_integer(L), is_atom(M) ->
end;
_ ->
lay_concrete(T0, Ctxt)
catch
_:_ ->
lay_concrete(T0, Ctxt)
end;
lay_error_info(T, Ctxt) ->
lay_concrete(T, Ctxt).
Expand Down
3 changes: 2 additions & 1 deletion src/formatters/otp_formatter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

%% Allow erl_syntax:syntaxTree/0 type spec and allow us to preserve original OTP code
-elvis([{elvis_style, atom_naming_convention, #{regex => "^([a-zA-Z][a-z0-9]*_?)*$"}},
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}}]).
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}},
{elvis_style, no_catch_expressions, disable}]).

-format #{inline_clause_bodies => true, unquote_atoms => false}.

Expand Down
6 changes: 3 additions & 3 deletions src/rebar3_ast_formatter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ format(File, Formatter, Opts) ->
QuickAST ->
Result;
NewAST ->
catch error_logger:error_report([{modified_ast, File},
{removed, QuickAST -- NewAST},
{added, NewAST -- QuickAST}]),
logger:error(#{modified_ast => File,
removed => QuickAST -- NewAST,
added => NewAST -- QuickAST}),
erlang:error({modified_ast, File, NewFile})
end
end.
Expand Down

0 comments on commit 59b7f8f

Please sign in to comment.