diff --git a/config/rebar.config b/config/rebar.config index a893a0f5..174faff7 100644 --- a/config/rebar.config +++ b/config/rebar.config @@ -8,7 +8,7 @@ {elvis, [ {config, - [#{dirs => ["../../_build/test/lib/elvis_core/test/examples"], + [#{dirs => ["../../_build/test/lib/elvis/test/examples"], filter => "**.erl", rules => [{elvis_style, line_length, #{limit => 135}}] } @@ -16,4 +16,4 @@ }, {output_format, plain} ] -}. \ No newline at end of file +}. diff --git a/config/test.config b/config/test.config index 97c8608e..06266782 100644 --- a/config/test.config +++ b/config/test.config @@ -3,7 +3,7 @@ elvis, [ {config, - [#{dirs => ["../../_build/test/lib/elvis_core/test/examples"], + [#{dirs => ["../../_build/test/lib/elvis/test/examples"], filter => "**.erl", rules => [{elvis_style, line_length, #{limit => 80, skip_comments => false}}, diff --git a/rebar.config b/rebar.config index f35e1d43..3ef36000 100644 --- a/rebar.config +++ b/rebar.config @@ -23,15 +23,15 @@ {profiles, [ {test, [ - {deps, [ {katana_test, {git, "https://github.com/inaka/katana-test.git", {tag, "0.0.6"}}} - , {mixer, {git, "https://github.com/inaka/mixer.git", {tag, "0.1.5"}}} + {deps, [ {mixer, "0.1.5", {pkg, inaka_mixer}} , {seqbind, {git, "https://github.com/lpgauth/seqbind.git", {ref, "3a4b344"}}} - , {meck, "0.8.3"} + , {meck, "0.8.4"} + , {xref_runner, "1.0.0"} ]} ]}, {shell, [ {deps, [ - {sync, {git, "https://github.com/rustyio/sync.git", {ref, "9c78e7b"}}} + {sync, "0.1.3"} ]} ]} ]}. @@ -67,7 +67,7 @@ %% == Dependencies == -{deps, [ {lager, "3.0.2"} +{deps, [ {lager, "3.2.4"} , {zipper, "1.0.1"} , {katana_code, "0.1.0"} ]}. diff --git a/rebar.lock b/rebar.lock index 5da3acd0..2f6937fd 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,14 +1,14 @@ {"1.1.0", [{<<"aleppo">>,{pkg,<<"inaka_aleppo">>,<<"1.0.0">>},1}, - {<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.7">>},1}, + {<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1}, {<<"katana_code">>,{pkg,<<"katana_code">>,<<"0.1.0">>},0}, - {<<"lager">>,{pkg,<<"lager">>,<<"3.0.2">>},0}, + {<<"lager">>,{pkg,<<"lager">>,<<"3.2.4">>},0}, {<<"zipper">>,{pkg,<<"zipper">>,<<"1.0.1">>},0}]}. [ {pkg_hash,[ {<<"aleppo">>, <<"8DB14CF16BB8C263C14FF4C3F69F64D7C849D40888944F4204D2CA74F1114CEB">>}, - {<<"goldrush">>, <<"349A351D17C71C2FDAA18A6C2697562ABE136FEC945F147B381F0CF313160228">>}, + {<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>}, {<<"katana_code">>, <<"C34F3926A258D6BEACD8D21F140F3D47D175501936431C460B144339D5271A0B">>}, - {<<"lager">>, <<"25DC81BC3659B62F5AB9BD073E97DDD894FC4C242019FCCEF96F3889D7366C97">>}, + {<<"lager">>, <<"A6DEB74DAE7927F46BD13255268308EF03EB206EC784A94EAF7C1C0F3B811615">>}, {<<"zipper">>, <<"3CCB4F14B97C06B2749B93D8B6C204A1ECB6FAFC6050CACC3B93B9870C05952A">>}]} ]. diff --git a/test/elvis_SUITE.erl b/test/elvis_SUITE.erl index 871f7a06..b76b8cec 100644 --- a/test/elvis_SUITE.erl +++ b/test/elvis_SUITE.erl @@ -115,7 +115,7 @@ rock_with_list_config(_Config) -> -spec rock_with_file_config(config()) -> ok. rock_with_file_config(_Config) -> Fun = fun() -> elvis_core:rock() end, - Expected = "# \\.\\./\\.\\./_build/test/lib/elvis_core/test/" ++ + Expected = "# \\.\\./\\.\\./_build/test/lib/elvis/test/" ++ "examples/.*\\.erl.*FAIL", [_ | _] = check_some_line_output(Fun, Expected, fun matches_regex/2), ok. @@ -168,7 +168,7 @@ rock_this(_Config) -> end, Path = - "../../_build/test/lib/elvis_core/test/examples/fail_line_length.erl", + "../../_build/test/lib/elvis/test/examples/fail_line_length.erl", {fail, _} = elvis_core:rock_this(Path), ok. @@ -231,23 +231,23 @@ rock_with_rule_groups(_Config) -> rock_this_skipping_files(_Config) -> meck:new(elvis_file, [passthrough]), - Dirs = ["../../_build/test/lib/elvis_core/test/examples"], + Dirs = ["../../_build/test/lib/elvis/test/examples"], [File] = elvis_file:find_files(Dirs, "small.erl"), Path = elvis_file:path(File), ConfigPath = "../../config/elvis-test-pa.config", ElvisConfig = elvis_config:load_file(ConfigPath), - elvis_core:rock_this(Path, ElvisConfig), + ok = elvis_core:rock_this(Path, ElvisConfig), 0 = meck:num_calls(elvis_file, load_file_data, '_'), meck:unload(elvis_file). rock_this_not_skipping_files(_Config) -> meck:new(elvis_file, [passthrough]), - Dirs = ["../../_build/test/lib/elvis_core/test/examples"], + Dirs = ["../../_build/test/lib/elvis/test/examples"], [File] = elvis_file:find_files(Dirs, "small.erl"), Path = elvis_file:path(File), ConfigPath = "../../config/test.config", ElvisConfig = elvis_config:load_file(ConfigPath), - elvis_core:rock_this(Path, ElvisConfig), + ok = elvis_core:rock_this(Path, ElvisConfig), 1 = meck:num_calls(elvis_file, load_file_data, '_'), meck:unload(elvis_file). diff --git a/test/examples/pass_no_useless_seqbind.erl b/test/examples/pass_no_useless_seqbind.erl index e06dab29..38b305f7 100644 --- a/test/examples/pass_no_useless_seqbind.erl +++ b/test/examples/pass_no_useless_seqbind.erl @@ -2,6 +2,8 @@ -compile({parse_transformer, seqbind}). +-dialyzer(no_match). + -export([demo/0]). demo() -> diff --git a/test/style_SUITE.erl b/test/style_SUITE.erl index 3a5fd66e..a7b294be 100644 --- a/test/style_SUITE.erl +++ b/test/style_SUITE.erl @@ -127,7 +127,7 @@ verify_line_length_rule(_Config) -> Result = elvis_style:line_length(ElvisConfig, Path, #{limit => 80}), 8 = length(Result), #{info := Info, message := Msg} = lists:nth(7, Result), - <<"Line 32 is too long: gb_trees:from_orddict(", _/binary>> = + <<"Line 34 is too long: gb_trees:from_orddict(", _/binary>> = list_to_binary(io_lib:format(Msg, Info)), WholeLineResult = elvis_style:line_length(ElvisConfig, Path, @@ -246,13 +246,13 @@ verify_nesting_level(_Config) -> {ok, File} = elvis_test_utils:find_file(SrcDirs, Path), [ - #{line_num := 9}, - #{line_num := 16}, - #{line_num := 28}, - #{line_num := 43}, - #{line_num := 76}, - #{line_num := 118}, - #{line_num := 164} + #{line_num := 11}, + #{line_num := 18}, + #{line_num := 30}, + #{line_num := 45}, + #{line_num := 78}, + #{line_num := 120}, + #{line_num := 166} ] = elvis_style:nesting_level(ElvisConfig, File, #{limit => 3}), [] = elvis_style:nesting_level( ElvisConfig , File @@ -278,9 +278,9 @@ verify_no_if_expression(_Config) -> Path = "fail_no_if_expression.erl", {ok, File} = elvis_test_utils:find_file(SrcDirs, Path), [ - #{line_num := 9}, - #{line_num := 20}, - #{line_num := 29} + #{line_num := 11}, + #{line_num := 22}, + #{line_num := 31} ] = elvis_style:no_if_expression(ElvisConfig, File, #{}). -spec verify_invalid_dynamic_call(config()) -> any(). @@ -295,10 +295,10 @@ verify_invalid_dynamic_call(_Config) -> PathFail = "fail_invalid_dynamic_call.erl", {ok, FileFail} = elvis_test_utils:find_file(SrcDirs, PathFail), [ - #{line_num := 13}, - #{line_num := 25}, - #{line_num := 26}, - #{line_num := 34} + #{line_num := 18}, + #{line_num := 30}, + #{line_num := 31}, + #{line_num := 39} ] = elvis_style:invalid_dynamic_call(ElvisConfig, FileFail, #{}), RuleConfig = #{ignore => [fail_invalid_dynamic_call]}, @@ -549,9 +549,9 @@ verify_no_nested_try_catch(_Config) -> Path = "fail_no_nested_try_catch.erl", {ok, File} = elvis_test_utils:find_file(SrcDirs, Path), [ - #{line_num := 13}, - #{line_num := 28}, - #{line_num := 35} + #{line_num := 18}, + #{line_num := 33}, + #{line_num := 40} ] = elvis_style:no_nested_try_catch(ElvisConfig, File, #{}). -spec verify_no_seqbind(config()) -> any().