|
1 |
| -%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*- |
2 |
| -%% ex: ts=4 sw=4 ft=erlang et |
| 1 | +%% == Compiler and Profiles == |
3 | 2 |
|
4 |
| -%% == Erlang Compiler == |
| 3 | +{erl_opts, |
| 4 | + [warn_unused_import, warn_export_vars, warnings_as_errors, verbose, report, debug_info]}. |
5 | 5 |
|
6 |
| -%% Erlang compiler options |
7 |
| -{erl_opts, [debug_info, warn_export_vars, warn_missing_spec, warn_unused_import]}. |
| 6 | +{minimum_otp_vsn, "23"}. |
8 | 7 |
|
9 | 8 | {profiles,
|
10 | 9 | [{test,
|
11 | 10 | [{extra_src_dirs, ["test/examples"]},
|
12 | 11 | {deps, [{meck, "0.9.2"}]},
|
13 | 12 | {erl_opts, [nowarn_missing_spec, nowarn_export_all]},
|
14 |
| - {dialyzer, [{warnings, [no_return, unmatched_returns, error_handling]}]}]}]}. |
| 13 | + {dialyzer, [{warnings, [no_return, error_handling]}, {plt_extra_apps, [common_test]}]}, |
| 14 | + {ct_opts, [{sys_config, ["./config/test.config"]}, {logdir, "./logs"}, {verbose, true}]}, |
| 15 | + {cover_enabled, true}, |
| 16 | + {cover_opts, [verbose]}]}]}. |
15 | 17 |
|
16 |
| -{ct_opts, [{sys_config, ["./config/test.config"]}, {logdir, "./logs"}, {verbose, true}]}. |
| 18 | +{alias, [{test, [compile, format, hank, xref, dialyzer, ct, cover, ex_doc]}]}. |
17 | 19 |
|
18 |
| -%% == Cover == |
19 |
| - |
20 |
| -{cover_enabled, true}. |
21 |
| - |
22 |
| -{cover_opts, [verbose]}. |
| 20 | +{shell, [{config, "config/test.config"}]}. |
23 | 21 |
|
24 |
| -%% == Dependencies == |
| 22 | +%% == Dependencies and plugins == |
25 | 23 |
|
26 |
| -{deps, [{zipper, "1.0.1"}, {katana_code, "~> 2.0.2"}]}. |
| 24 | +{deps, [{zipper, "1.0.1"}, {katana_code, "~> 2.1.0"}]}. |
27 | 25 |
|
28 |
| -%% == Dialyzer == |
| 26 | +{project_plugins, |
| 27 | + [{rebar3_hank, "~> 1.4.0"}, |
| 28 | + {rebar3_hex, "~> 7.0.7"}, |
| 29 | + {rebar3_format, "~> 1.3.0"}, |
| 30 | + {rebar3_ex_doc, "0.2.18"}]}. |
29 | 31 |
|
30 |
| -{dialyzer, |
31 |
| - [{warnings, [no_return, unmatched_returns, error_handling, unknown]}, |
32 |
| - {plt_apps, top_level_deps}, |
33 |
| - {plt_extra_apps, [kernel, stdlib]}, |
34 |
| - {plt_location, local}]}. |
| 32 | +%% == Documentation == |
35 | 33 |
|
36 |
| -{shell, [{config, "config/test.config"}]}. |
| 34 | +{ex_doc, |
| 35 | + [{source_url, <<"https://github.com/inaka/elvis_core">>}, |
| 36 | + {extras, [<<"README.md">>, <<"LICENSE">>]}, |
| 37 | + {main, <<"readme">>}]}. |
37 | 38 |
|
38 |
| -%% == xref == |
| 39 | +{hex, [{doc, #{provider => ex_doc}}]}. |
39 | 40 |
|
40 |
| -{xref_checks, [undefined_function_calls, locals_not_used, deprecated_function_calls]}. |
| 41 | +%% == Format == |
41 | 42 |
|
42 |
| -%% == Aliases == |
| 43 | +{format, |
| 44 | + [{files, |
| 45 | + ["config/**/*.config", "src/**/*.app.src", "src/**/*.erl", "test/*.erl", "*.config"]}]}. |
43 | 46 |
|
44 |
| -{alias, [{test, [format, xref, dialyzer, hank, ct, cover, edoc]}]}. |
| 47 | +%% == Hank == |
45 | 48 |
|
46 |
| -{project_plugins, |
47 |
| - [{rebar3_hex, "~> 7.0.1"}, {rebar3_format, "~> 1.2.0"}, {rebar3_hank, "~> 1.3.0"}]}. |
| 49 | +{hank, [{ignore, ["test/*/**"]}]}. |
48 | 50 |
|
49 |
| -%% == hank == |
| 51 | +%% == Dialyzer + XRef == |
50 | 52 |
|
51 |
| -{hank, |
52 |
| - [{ignore, |
53 |
| - [{"test/*/**", unnecessary_function_arguments}, |
54 |
| - {"test/*/**", unused_macros}, |
55 |
| - {"test/*/**", unused_callbacks}]}]}. |
| 53 | +{dialyzer, [{warnings, [no_return, unmatched_returns, error_handling, unknown]}]}. |
56 | 54 |
|
57 |
| -%% == format == |
| 55 | +{xref_checks, |
| 56 | + [undefined_function_calls, deprecated_function_calls, deprecated_functions]}. |
58 | 57 |
|
59 |
| -{format, |
60 |
| - [{files, |
61 |
| - ["config/**/*.config", "src/**/*.app.src", "src/**/*.erl", "test/*.erl", "*.config"]}]}. |
| 58 | +{xref_extra_paths, ["test/**"]}. |
0 commit comments