|
1 | | -%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*- |
2 | | -%% ex: ts=4 sw=4 ft=erlang et |
3 | | - |
4 | | -%% == Erlang Compiler == |
5 | | - |
6 | | -%% Erlang compiler options |
7 | | -{erl_opts, [ |
8 | | - warn_unused_vars, |
9 | | - warn_export_all, |
10 | | - warn_shadow_vars, |
11 | | - warn_unused_import, |
12 | | - warn_unused_function, |
13 | | - warn_bif_clash, |
14 | | - warn_unused_record, |
15 | | - warn_deprecated_function, |
16 | | - warn_obsolete_guard, |
17 | | - strict_validation, |
18 | | - warn_export_vars, |
19 | | - warn_exported_vars, |
20 | | - warn_missing_spec, |
21 | | - warn_untyped_record, debug_info |
22 | | - ]}. |
23 | | - |
24 | | -{profiles, [ |
25 | | - {test, [ |
26 | | - {deps, [ |
27 | | - {xref_runner, "1.0.0"} |
28 | | - ]} |
29 | | - ]}, |
30 | | - {shell, [ |
31 | | - {deps, [ |
32 | | - {sync, {git, "https://github.com/rustyio/sync.git", {ref, "9c78e7b"}}} |
33 | | - ]} |
34 | | - ]} |
35 | | -]}. |
36 | | - |
37 | | -%% == Common Test == |
38 | | - |
39 | | -%% {erl_opts, [...]}, but for CT runs |
40 | | -{ct_compile_opts, [ |
41 | | - warn_unused_vars, |
42 | | - warn_export_all, |
43 | | - warn_shadow_vars, |
44 | | - warn_unused_import, |
45 | | - warn_unused_function, |
46 | | - warn_bif_clash, |
47 | | - warn_unused_record, |
48 | | - warn_deprecated_function, |
49 | | - warn_obsolete_guard, |
50 | | - strict_validation, |
51 | | - warn_export_vars, |
52 | | - warn_exported_vars, |
53 | | - warn_missing_spec, |
54 | | - warn_untyped_record, debug_info |
55 | | - ]}. |
56 | | - |
57 | | -{ct_opts, []}. |
58 | | - |
59 | | -%% == Cover == |
60 | | - |
61 | | -{cover_enabled, true}. |
62 | | - |
63 | | -{cover_opts, [verbose]}. |
64 | | - |
65 | | -%% == Dependencies == |
66 | | - |
67 | | -{deps, []}. |
68 | | - |
69 | | -%% == Dialyzer == |
70 | | - |
71 | | -{dialyzer, [ |
72 | | - {warnings, [ unmatched_returns |
73 | | - , error_handling |
74 | | - ]}, |
75 | | - {get_warnings, true}, |
76 | | - {plt_apps, top_level_deps}, |
77 | | - {plt_extra_apps, []}, |
78 | | - {plt_location, local}, |
79 | | - {base_plt_apps, [stdlib, kernel]}, |
80 | | - {base_plt_location, global} |
81 | | -]}. |
82 | | - |
83 | | -%% == Shell == |
84 | | - |
85 | | -{shell, [{apps, [sync]}]}. |
| 1 | +%% == Compiler and Profiles == |
| 2 | + |
| 3 | +{erl_opts, |
| 4 | + [warn_unused_import, warn_export_vars, warnings_as_errors, verbose, report, debug_info]}. |
| 5 | + |
| 6 | +{minimum_otp_vsn, "24"}. |
| 7 | + |
| 8 | +{profiles, |
| 9 | + [{test, |
| 10 | + [{cover_enabled, true}, |
| 11 | + {cover_opts, [verbose]}, |
| 12 | + {ct_opts, [{verbose, true}]}, |
| 13 | + {dialyzer, |
| 14 | + [{warnings, [no_return, unmatched_returns, error_handling, unknown]}, |
| 15 | + {plt_extra_apps, [syntax_tools]}]}]}, |
| 16 | + {shell, [{deps, [{sync, "0.4.1"}]}, {apps, [sync]}]}]}. |
| 17 | + |
| 18 | +{alias, [{test, [compile, format, hank, lint, xref, dialyzer, ct, cover, ex_doc]}]}. |
| 19 | + |
| 20 | +%% == Dependencies and plugins == |
| 21 | + |
| 22 | +{project_plugins, |
| 23 | + [{rebar3_hank, "~> 1.4.0"}, |
| 24 | + {rebar3_hex, "~> 7.0.7"}, |
| 25 | + {rebar3_format, "~> 1.3.0"}, |
| 26 | + {rebar3_lint, "~> 3.1.0"}, |
| 27 | + {rebar3_ex_doc, "~> 0.2.20"}]}. |
| 28 | + |
| 29 | +%% == Documentation == |
| 30 | + |
| 31 | +{ex_doc, |
| 32 | + [{source_url, <<"https://github.com/inaka/zipper">>}, |
| 33 | + {extras, [<<"README.md">>, <<"LICENSE">>]}, |
| 34 | + {main, <<"README.md">>}, |
| 35 | + {prefix_ref_vsn_with_v, false}]}. |
| 36 | + |
| 37 | +{hex, [{doc, #{provider => ex_doc}}]}. |
| 38 | + |
| 39 | +%% == Format == |
| 40 | + |
| 41 | +{format, [{files, ["*.config", "src/*", "test/*"]}]}. |
| 42 | + |
| 43 | +%% == Hank == |
| 44 | + |
| 45 | +{hank, [{ignore, [{"test/*.erl", unnecessary_function_arguments}]}]}. |
| 46 | + |
| 47 | +%% == Dialyzer + XRef == |
| 48 | + |
| 49 | +{dialyzer, |
| 50 | + [{warnings, [no_return, unmatched_returns, error_handling, unknown]}, |
| 51 | + {plt_extra_apps, [syntax_tools]}]}. |
| 52 | + |
| 53 | +{xref_checks, |
| 54 | + [undefined_function_calls, deprecated_function_calls, deprecated_functions]}. |
| 55 | + |
| 56 | +{xref_extra_paths, ["test/**"]}. |
0 commit comments