This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
rebar.config
80 lines (67 loc) · 2.07 KB
/
rebar.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
%% == Erlang Compiler ==
{
erl_opts,
[
debug_info,
report,
verbose,
warnings_as_errors,
{warn_format, 1},
warn_export_all,
warn_export_vars,
warn_obsolete_guard,
warn_untyped_record,
warn_unused_import,
warn_shadow_vars,
{d, 'TEST_MACRO', 100}
]
}.
%% == Dependencies ==
{deps, [{providers, "1.8.1"}]}.
%% == Plugins ==
{plugins, [steamroller, {rebar3_autotest, "0.1.1"}, rebar3_hex]}.
%% == Steamroller ==
% Example Config
% line_length: 100 is the default but it can be configured here.
% indent: 2 is the default but it can be configured here.
% inputs: list of wildcards to find files to autoformat.
{
steamroller,
[
{line_length, 100},
{indent, 2},
{inputs, ["rebar.config", "{src,test,include}/*.{[he]rl,app.src}"]}
]
}.
%% == Dialyzer ==
{
dialyzer,
[
{warnings, [unknown]},
%
% Dialyzer will get upset if it has to analyse the provider.
%
% Tried adding 'rebar3' as a dep and to plt_extra_apps which seems like it should have
% fixed the problem, but instead we get a load of 'Could not get Core Erlang code for:'
% errors for all of the rebar3 beam files. Presumably because deps are compiled using
% the prod profile and the rebar3 prod profile has 'no_debug_info'.
%
% Using `{overrides, [{override, rebar3, [{erl_opts, [debug_info]}]}]}.` seems to do
% nothing.
%
% If you exclude only steamroller_prv then diazyler gets upset about steamroller:init
% using an unknown function (steamroller_prv:init) so we exclude both.
%
% There must be an easy way to sort this out...
%
{plt_extra_apps, [providers]},
{exclude_mods, [steamroller, steamroller_prv, steamroller_worker]}
]
}.
%% == Aliases ==
{alias, [{check, [eunit, {steamroll, "--check"}, dialyzer]}, {test, [eunit]}]}.
%% == Overrides ==
% This is a hack so that steamroller can use itself as a plugin.
% Create a symlink in $REPO/_checkouts to $REPO.
% By overriding the dep steamroller's plugins we prevent an infinite dep loop.
{overrides, [{override, steamroller, [{plugins, []}]}]}.