2019-06-21 08:46:13 +00:00
|
|
|
[
|
2020-10-14 10:05:42 +00:00
|
|
|
{elvis, [
|
2022-07-11 11:29:55 +00:00
|
|
|
{verbose, true},
|
2020-10-14 10:05:42 +00:00
|
|
|
{config, [
|
|
|
|
#{
|
2022-07-11 11:29:55 +00:00
|
|
|
dirs => ["apps/*/src", "apps/*/include"],
|
2020-10-14 10:05:42 +00:00
|
|
|
filter => "*.erl",
|
2022-07-11 11:29:55 +00:00
|
|
|
ruleset => erl_files,
|
2020-10-14 10:05:42 +00:00
|
|
|
rules => [
|
2022-07-11 11:29:55 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
2020-10-14 10:05:42 +00:00
|
|
|
{elvis_style, nesting_level, #{level => 3}},
|
2022-07-11 11:29:55 +00:00
|
|
|
{elvis_style, no_if_expression, disable},
|
|
|
|
{elvis_style, state_record_and_type, disable},
|
|
|
|
{elvis_style, dont_repeat_yourself, #{min_complexity => 15}}
|
2020-10-14 10:05:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
#{
|
2022-07-11 11:29:55 +00:00
|
|
|
dirs => ["apps/**/test"],
|
2020-10-14 10:05:42 +00:00
|
|
|
filter => "*.erl",
|
2022-07-11 11:29:55 +00:00
|
|
|
ruleset => erl_files,
|
2020-10-14 10:05:42 +00:00
|
|
|
rules => [
|
2022-07-11 11:29:55 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
2020-10-14 10:05:42 +00:00
|
|
|
{elvis_style, nesting_level, #{level => 3}},
|
2022-07-11 11:29:55 +00:00
|
|
|
{elvis_style, no_if_expression, disable},
|
|
|
|
% We want to use `ct:pal/2` and friends in test code.
|
|
|
|
{elvis_style, no_debug_call, disable},
|
|
|
|
% Tests are usually more comprehensible when a bit more verbose.
|
|
|
|
{elvis_style, dont_repeat_yourself, #{min_complexity => 30}},
|
|
|
|
{elvis_style, god_modules, disable}
|
2020-10-14 10:05:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["."],
|
|
|
|
filter => "Makefile",
|
|
|
|
ruleset => makefiles
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["."],
|
|
|
|
filter => "elvis.config",
|
|
|
|
ruleset => elvis_config
|
|
|
|
},
|
|
|
|
#{
|
2022-07-11 11:29:55 +00:00
|
|
|
dirs => [".", "apps/*"],
|
2020-10-14 10:05:42 +00:00
|
|
|
filter => "rebar.config",
|
2022-07-11 11:29:55 +00:00
|
|
|
ruleset => rebar_config,
|
2020-10-14 10:05:42 +00:00
|
|
|
rules => [
|
2022-07-11 11:29:55 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
2021-09-14 08:45:37 +00:00
|
|
|
{elvis_text_style, no_tabs},
|
2022-07-11 11:29:55 +00:00
|
|
|
{elvis_text_style, no_trailing_whitespace},
|
|
|
|
%% Temporarily disabled till regex pattern is available
|
|
|
|
{elvis_project, no_deps_master_rebar, disable}
|
2020-10-14 10:05:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["apps/*/src"],
|
|
|
|
filter => "*.app.src",
|
|
|
|
rules => [
|
2022-07-11 11:29:55 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
2021-09-14 08:45:37 +00:00
|
|
|
{elvis_text_style, no_tabs},
|
|
|
|
{elvis_text_style, no_trailing_whitespace}
|
2020-10-14 10:05:42 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]}
|
|
|
|
]}
|
2019-06-21 08:46:13 +00:00
|
|
|
].
|