2016-08-26 15:15:48 +00:00
|
|
|
[
|
|
|
|
{elvis, [
|
2022-10-03 11:27:41 +00:00
|
|
|
{verbose, true},
|
2016-08-26 15:15:48 +00:00
|
|
|
{config, [
|
|
|
|
#{
|
2022-01-21 12:10:58 +00:00
|
|
|
dirs => ["src", "include", "test"],
|
2016-08-26 15:15:48 +00:00
|
|
|
filter => "*.erl",
|
2022-01-21 12:10:58 +00:00
|
|
|
ruleset => erl_files,
|
2016-08-26 15:15:48 +00:00
|
|
|
rules => [
|
2022-01-21 12:10:58 +00:00
|
|
|
% common conventions
|
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
2016-08-26 15:15:48 +00:00
|
|
|
{elvis_style, nesting_level, #{level => 3}},
|
2022-01-21 12:10:58 +00:00
|
|
|
{elvis_style, no_if_expression, disable},
|
|
|
|
{elvis_style, state_record_and_type, disable},
|
|
|
|
% woody_erlang specific
|
|
|
|
{elvis_style, function_naming_convention, #{regex => "^([a-z][a-z0-9_]*_?)*$"}},
|
|
|
|
{elvis_style, atom_naming_convention, #{regex => "^([a-z][a-zA-Z0-9_]*_?)*$"}},
|
|
|
|
{elvis_style, macro_names, #{ignore => [woody_transport_opts_SUITE]}},
|
|
|
|
{elvis_style, macro_module_names, disable},
|
2020-08-18 10:01:47 +00:00
|
|
|
{elvis_style, invalid_dynamic_call, #{
|
|
|
|
ignore => [
|
|
|
|
woody_event_formatter,
|
2022-01-21 12:10:58 +00:00
|
|
|
woody_event_handler,
|
2020-08-18 10:01:47 +00:00
|
|
|
woody_util
|
|
|
|
]
|
|
|
|
}},
|
2018-11-07 09:54:54 +00:00
|
|
|
{elvis_style, no_debug_call, #{
|
|
|
|
ignore => [
|
2019-06-06 10:11:48 +00:00
|
|
|
woody_ssl_SUITE,
|
2018-11-07 09:54:54 +00:00
|
|
|
woody_tests_SUITE,
|
2019-12-31 09:52:56 +00:00
|
|
|
woody_transport_opts_SUITE,
|
2021-06-22 08:01:27 +00:00
|
|
|
woody_ct_event_h,
|
2019-12-31 09:52:56 +00:00
|
|
|
benchmark_memory_pressure
|
2018-11-07 09:54:54 +00:00
|
|
|
]
|
2022-01-21 12:10:58 +00:00
|
|
|
}},
|
|
|
|
{elvis_style, god_modules, #{limit => 25, ignore => [woody_tests_SUITE]}},
|
|
|
|
{elvis_style, dont_repeat_yourself, #{
|
|
|
|
min_complexity => 17,
|
|
|
|
ignore => [woody_test_thrift, woody_tests_SUITE]
|
2018-11-07 09:54:54 +00:00
|
|
|
}}
|
2016-08-26 15:15:48 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["."],
|
|
|
|
filter => "Makefile",
|
|
|
|
ruleset => makefiles
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["."],
|
|
|
|
filter => "elvis.config",
|
|
|
|
ruleset => elvis_config
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["."],
|
|
|
|
filter => "rebar.config",
|
2022-01-21 12:10:58 +00:00
|
|
|
ruleset => rebar_config,
|
|
|
|
rules => [
|
2022-10-03 11:27:41 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
2022-01-21 12:10:58 +00:00
|
|
|
{elvis_text_style, no_tabs},
|
|
|
|
{elvis_text_style, no_trailing_whitespace},
|
|
|
|
%% Temporarily disabled till regex pattern is available
|
|
|
|
{elvis_project, no_deps_master_rebar, disable}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
#{
|
|
|
|
dirs => ["src"],
|
|
|
|
filter => "*.app.src",
|
2016-08-26 15:15:48 +00:00
|
|
|
rules => [
|
2022-10-03 11:27:41 +00:00
|
|
|
{elvis_text_style, line_length, #{limit => 120}},
|
2022-01-21 12:10:58 +00:00
|
|
|
{elvis_text_style, no_tabs},
|
|
|
|
{elvis_text_style, no_trailing_whitespace}
|
2016-08-26 15:15:48 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
].
|