2023-06-20 07:10:38 +00:00
|
|
|
[
|
|
|
|
{elvis, [
|
|
|
|
{verbose, true},
|
|
|
|
{config, [
|
|
|
|
#{
|
|
|
|
dirs => ["apps/**/src", "apps/**/include"],
|
|
|
|
filter => "*.erl",
|
|
|
|
ruleset => erl_files,
|
|
|
|
rules => [
|
2023-07-03 07:14:41 +00:00
|
|
|
%% Common settings
|
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
|
|
|
{elvis_style, nesting_level, #{
|
|
|
|
level => 3,
|
|
|
|
ignore => [
|
|
|
|
akm_db_migration
|
|
|
|
]
|
|
|
|
}},
|
|
|
|
{elvis_style, function_naming_convention, #{regex => "^([a-z][a-z0-9]*_?)*$"}},
|
|
|
|
{elvis_style, no_if_expression, disable},
|
|
|
|
%% Project settings
|
|
|
|
% Verbose authorization code triggers this otherwise
|
|
|
|
{elvis_style, dont_repeat_yourself, #{min_complexity => 35}},
|
2023-07-06 16:08:08 +00:00
|
|
|
{elvis_style, atom_naming_convention, #{
|
|
|
|
ignore => [
|
|
|
|
akm_apikeys_handler,
|
2023-08-07 08:46:13 +00:00
|
|
|
akm_apikeys_processing,
|
|
|
|
akm_handler
|
2023-07-06 16:08:08 +00:00
|
|
|
]
|
2023-07-21 11:40:50 +00:00
|
|
|
}},
|
|
|
|
{elvis_style, invalid_dynamic_call, #{
|
|
|
|
ignore => [
|
|
|
|
akm_mailer
|
|
|
|
]
|
2023-07-06 16:08:08 +00:00
|
|
|
}}
|
2023-07-03 07:14:41 +00:00
|
|
|
]
|
2023-06-20 07:10:38 +00:00
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["apps/**/test"],
|
|
|
|
filter => "*.erl",
|
|
|
|
ruleset => erl_files,
|
|
|
|
rules => [
|
2023-07-03 07:14:41 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
|
|
|
{elvis_style, nesting_level, #{level => 3}},
|
|
|
|
{elvis_style, no_if_expression, disable},
|
|
|
|
% We want to use `ct:pal/2` and friends in test code.
|
|
|
|
{elvis_style, no_debug_call, disable},
|
|
|
|
% Assert macros can trigger use of ignored binding, yet we want them for better
|
|
|
|
% readability.
|
|
|
|
{elvis_style, used_ignored_variable, disable},
|
|
|
|
% Tests are usually more comprehensible when a bit more verbose.
|
|
|
|
{elvis_style, dont_repeat_yourself, #{min_complexity => 50}},
|
|
|
|
{elvis_style, god_modules, disable}
|
|
|
|
]
|
2023-06-20 07:10:38 +00:00
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["."],
|
|
|
|
filter => "Makefile",
|
|
|
|
ruleset => makefiles
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["."],
|
|
|
|
filter => "elvis.config",
|
|
|
|
ruleset => elvis_config
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["apps/*/src"],
|
|
|
|
filter => "*.app.src",
|
|
|
|
rules => [
|
2023-07-03 07:14:41 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
|
|
|
{elvis_text_style, no_tabs},
|
|
|
|
{elvis_text_style, no_trailing_whitespace}
|
|
|
|
]
|
2023-06-20 07:10:38 +00:00
|
|
|
}
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
].
|