From 49543e7be3d2cf465d6469be64b5118d92a39c22 Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Mon, 8 Feb 2021 10:32:17 +0000 Subject: [PATCH 1/3] Bump elvis_core --- rebar.config | 2 +- rebar.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rebar.config b/rebar.config index 19c40e4..2f8018a 100644 --- a/rebar.config +++ b/rebar.config @@ -7,7 +7,7 @@ %% == Dependencies and plugins == {deps, [ - {elvis_core, "~>1.0.0"} + {elvis_core, "~>1.1.1"} ]}. {project_plugins, [rebar3_hex]}. diff --git a/rebar.lock b/rebar.lock index 2eb45cf..c1cd5b0 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,14 +1,14 @@ {"1.2.0", -[{<<"elvis_core">>,{pkg,<<"elvis_core">>,<<"1.0.0">>},0}, +[{<<"elvis_core">>,{pkg,<<"elvis_core">>,<<"1.1.1">>},0}, {<<"katana_code">>,{pkg,<<"katana_code">>,<<"0.2.1">>},1}, {<<"zipper">>,{pkg,<<"zipper">>,<<"1.0.1">>},1}]}. [ {pkg_hash,[ - {<<"elvis_core">>, <<"01A18169EC80004D2444001E1157B117270B4CD38693A66C3AAB61A6459ADBFA">>}, + {<<"elvis_core">>, <<"EB7864CE4BC87D13FBF1C222A82230A4C3D327C21080B73E97FC6343C3A5264D">>}, {<<"katana_code">>, <<"B2195859DF57D8BEBF619A9FD3327CD7D01563A98417156D0F4C5FAB435F2630">>}, {<<"zipper">>, <<"3CCB4F14B97C06B2749B93D8B6C204A1ECB6FAFC6050CACC3B93B9870C05952A">>}]}, {pkg_hash_ext,[ - {<<"elvis_core">>, <<"DDA7A54CD4CE3D2BD93A4C9B421F59CA69C2301ECF3C171761BF098C6EB6AE0A">>}, + {<<"elvis_core">>, <<"391C95BAA49F2718D7FB498BCF08046DDFC202CF0AAB63B2E439271485C9DC42">>}, {<<"katana_code">>, <<"8448AD3F56D9814F98A28BE650F7191BDD506575E345CC16D586660B10F6E992">>}, {<<"zipper">>, <<"6A1FD3E1F0CC1D1DF5642C9A0CE2178036411B0A5C9642851D1DA276BD737C2D">>}]} ]. From ab01df0c818be96180067e7ee78e215bb2a084fb Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Mon, 8 Feb 2021 10:32:35 +0000 Subject: [PATCH 2/3] Respect elvis_core's interface --- src/rebar3_lint_prv.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rebar3_lint_prv.erl b/src/rebar3_lint_prv.erl index da86cc0..5aba83a 100644 --- a/src/rebar3_lint_prv.erl +++ b/src/rebar3_lint_prv.erl @@ -42,11 +42,11 @@ do(State) -> format_error(Reason) -> io_lib:format("~p", [Reason]). --spec get_elvis_config(rebar_state:t()) -> elvis_config:config(). +-spec get_elvis_config(rebar_state:t()) -> elvis_config:configs(). get_elvis_config(State) -> try_elvis_config_rebar(State). --spec try_elvis_config_rebar(rebar_state:t()) -> elvis_config:config(). +-spec try_elvis_config_rebar(rebar_state:t()) -> elvis_config:configs(). try_elvis_config_rebar(State) -> rebar_api:debug("Looking for Elvis in rebar.config", []), handle_output_format(State), @@ -72,7 +72,7 @@ handle_output_format(State) -> [Other]) end. --spec try_elvis_config_file(rebar_state:t()) -> elvis_config:config(). +-spec try_elvis_config_file(rebar_state:t()) -> elvis_config:configs(). try_elvis_config_file(State) -> Filename = filename:join(rebar_dir:root_dir(State), "elvis.config"), rebar_api:debug("Looking for Elvis in ~s", [Filename]), @@ -86,7 +86,7 @@ try_elvis_config_file(State) -> [Filename, Error]) end. --spec default_config() -> elvis_config:config(). +-spec default_config() -> elvis_config:configs(). default_config() -> rebar_api:debug("Using default Elvis configuration", []), [#{ dirs => ["apps/*/src/**", "src/**"], From dbb5adfa8be9995023969f066f40c724c653c968 Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Mon, 8 Feb 2021 10:53:09 +0000 Subject: [PATCH 3/3] Prevent (correct) elvis_core warning about not finding a file --- rebar.config | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rebar.config b/rebar.config index 2f8018a..b456a04 100644 --- a/rebar.config +++ b/rebar.config @@ -55,9 +55,6 @@ ruleset => erl_files }, #{ dirs => ["."], filter => "rebar.config", - ruleset => rebar_config }, - #{ dirs => ["."], - filter => "elvis.config", - ruleset => elvis_config } + ruleset => rebar_config } ]} ]}.