forked from dcos/mesos_state
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebar.config
100 lines (84 loc) · 2.9 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{dialyzer, [{warnings, [no_behaviours, no_match, race_conditions, error_handling]}]}.
{xref_checks, [undefined_function_calls, undefined_functions, locals_not_used, deprecated_function_calls, deprecated_functions]}.
{erl_opts, [
warnings_as_errors,
debug_info,
{parse_transform, lager_transform}
]}.
{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.
{edoc_opts, [{preprocess, true}]}.
{cover_enabled, true}.
%% Whether to print coverage report to console. Default is `false'
{cover_print_enabled, true}.
%% Whether to export coverage report to file. Default is `false'
{cover_export_enabled, true}.
{deps, [
{lager, ".*", {git, "https://github.com/basho/lager.git", {tag, "3.2.1"}}},
{jsx, ".*", {git, "https://github.com/talentdeficit/jsx.git", {tag, "v2.8.0"}}},
{eper, ".*", {git, "https://github.com/massemanet/eper.git", {tag, "0.97.1"}}},
{gpb, <<"3.26.4">>}
]}.
{profiles, [
{test,
[
{deps, [
{proper, ".*", {git, "https://github.com/manopapad/proper.git", master}}
]}
]},
{lint, [
{plugins, [{rebar3_lint, {git, "https://github.com/project-fifo/rebar3_lint.git", {tag, "0.1.2"}}}]}
]}
]}.
{plugins, [
{rebar3_gpb_plugin, ".*", {git, "https://github.com/lrascao/rebar3_gpb_plugin.git", {tag, "1.10.0"}}},
{rebar_covertool, ".*", {git, "[email protected]:idubrov/covertool.git", master}}
]}.
%% Because I had to add the dialyzer nowarn entries for mesos_state_overlay_pb
%% I do not run these manually
%% if you want to regenerate the protobuf:
%% ./rebar3 protobuf clean
%% ./rebar3 protobuf compile
{provider_hooks, [
{pre, [
{compile, {protobuf, compile}},
{clean, {protobuf, clean}}
]}
]}.
%% You have to manually add the following to mesos_state_overlay_pb.erl
%%
{gpb_opts, [
{msg_name_prefix, "mesos_state_"},
{module_name_prefix, "mesos_state_"},
{module_name_suffix, "_pb"},
{msg_name_to_lower, true},
{strings_as_binaries, true},
type_specs,
strings_as_binaries,
include_as_lib,
{verify, always},
{i, ["proto"]}
]}.
{xref_checks, []}.
{xref_queries, [{"(XC - UC) || (XU - X - B - \"(dtrace)\" : Mod)", []}]}.
{elvis,
[
#{dirs => ["src", "test"],
filter => "[a-oq-z][ac-z].erl",
rules => [
{elvis_style, max_function_length, #{max_length => 30}},
{elvis_style, no_spec_with_records},
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}},
{elvis_style, no_behavior_info},
{elvis_style, used_ignored_variable},
{elvis_style, nesting_level, #{level => 3}},
{elvis_style, god_modules, #{limit => 25}},
{elvis_style, no_if_expression},
{elvis_style, line_length, #{limit => 120, count_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace},
{elvis_style, macro_names},
{elvis_style, macro_module_names},
{elvis_style, operator_spaces, #{rules => [{right, ","}, {right, "++"}, {left, "++"}]}}
]}
]
}.