woody_erlang/elvis.config

64 lines
2.6 KiB
Plaintext
Raw Normal View History

[
{elvis, [
{config, [
#{
dirs => ["src", "test"],
filter => "*.erl",
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace},
{elvis_style, macro_module_names},
{elvis_style, operator_spaces, #{rules => [{right, ","}, {right, "++"}, {left, "++"}]}},
{elvis_style, nesting_level, #{level => 3}},
{elvis_style, god_modules, #{limit => 25, ignore => [woody_tests_SUITE]}},
{elvis_style, no_if_expression},
{elvis_style, invalid_dynamic_call, #{ignore => [woody_client_thrift, woody_event_formatter]}},
{elvis_style, used_ignored_variable},
{elvis_style, no_behavior_info},
{elvis_style, module_naming_convention, #{regex => "^[a-z]([a-z0-9]*_?)*(_SUITE)?$"}},
{elvis_style, function_naming_convention, #{regex => "^[a-z]([a-z0-9]*_?)*$"}},
{elvis_style, no_spec_with_records},
Add depth and limit to formatter (#110) * Force print trace_id and Co * Use integer control char for formtatting numbers * Sync * Fix format for "wrong" struct * Replace string formatting with inplace string representation * Replace foldl with tail call * Added opts comntainer * Add formatting with depth * Simplify depth increment * More depth tests * Format test data * lint fixes * Fix dialyzer errors * Introduce current_length and max_length * Add first tests for max_length * Add length options * Fix state in format_struct * Fix test * Move depth to stack from state * Move length from state to stack * Added more test on chars limit * More tests * Try to log more data nj logs * Cleanup * Fix line count in arguments * Add missing formatted text in list and map * Add comment to raw_string * Formating * Replace format with concatenation * Fix dialyzer errors * Fix lint errors * Ignore false positives * Added tests for max_length and max_depth * Let logger decide how to format data in case of error * Add formatter options to meta * Fix lint error * Increase complexity for dont_repeat_yourself * Increase compliexity - 2 * Decrease complexity to minimal for current codebase * Do not add '...' if no more argemunts in call * Unify arguments for maybe_add_delimiter and may_be_add_more_marker * Fix formating for list/set/map * Simplify format build * Log error * Review fixes * Move formatter options to environment * Minor fixes and code cleanup * Fix Opts * Review fix * Rework exception handling * Move list and set format to separate functions * Fix possible injection * Eliminate possible badmatch * Allow more complex dry * Add test for sets * Rework list formatter * More strict limit for length * Minor cleanup * Remove unreachable code * Switch back to formatter * Remove unneeded flatten * Do not format last list element if there is no room for it * Remove unused Param * Fix * Simplify formatting call * Add missing delimiter length * Fix woody_event_formatter:format_reply/3 * Cleanup * Add Opts to formatters * Make skip message compact * use ~w instead of ~p * Typo * Add formatter_opts to woody:options() * Rework options * Added escape for "'" * Rework tests * Fix tests * Rework
2019-12-03 13:12:17 +00:00
{elvis_style, dont_repeat_yourself, #{min_complexity => 17, ignore => [woody_test_thrift, woody_tests_SUITE]}},
{elvis_style, no_debug_call, #{
ignore => [
woody_ssl_SUITE,
woody_tests_SUITE,
woody_transport_opts_SUITE,
benchmark_memory_pressure
]
}}
]
},
#{
dirs => ["src"],
filter => "*.app.src",
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace}
]
},
#{
dirs => ["."],
filter => "Makefile",
ruleset => makefiles
},
#{
dirs => ["."],
filter => "elvis.config",
ruleset => elvis_config
},
#{
dirs => ["."],
filter => "rebar.config",
rules => [
{elvis_style, line_length, #{limit => 120, skip_comments => false}},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace}
]
}
]}
]}
].