mirror of
https://github.com/fluxerapp/fluxer.git
synced 2026-09-03 05:10:25 +03:00
224 lines
8.6 KiB
Plaintext
224 lines
8.6 KiB
Plaintext
[
|
|
{verbose, true},
|
|
{config, [
|
|
#{
|
|
files => ["src/*.erl", "src/**/*.erl"],
|
|
ruleset => erl_files_strict,
|
|
rules => [
|
|
{elvis_style, no_macros, disable},
|
|
{elvis_style, prefer_sigils, disable},
|
|
{elvis_style, prefer_strict_generators, disable},
|
|
{elvis_style, state_record_and_type, disable},
|
|
{elvis_style, no_init_lists, disable},
|
|
{elvis_style, consistent_ok_error_spec, disable},
|
|
{elvis_style, prefer_unquoted_atoms, disable},
|
|
{elvis_text_style, max_line_length, #{
|
|
limit => 100,
|
|
skip_comments => whole_line,
|
|
no_whitespace_after_limit => true
|
|
}},
|
|
{elvis_text_style, no_redundant_blank_lines, #{
|
|
max_lines => 1
|
|
}},
|
|
{elvis_style, max_function_length, #{
|
|
max_length => 60,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_function_clause_length, #{
|
|
max_length => 60,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_anonymous_function_length, #{
|
|
max_length => 20,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_anonymous_function_clause_length, #{
|
|
max_length => 15,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_function_arity, #{
|
|
max_arity => 10,
|
|
non_exported_max_arity => 10
|
|
}},
|
|
{elvis_style, max_anonymous_function_arity, #{
|
|
max_arity => 5
|
|
}},
|
|
{elvis_style, max_module_length, #{
|
|
max_length => 600,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, no_deep_nesting, #{
|
|
level => 2
|
|
}},
|
|
{elvis_style, code_complexity, #{
|
|
max_complexity => 25
|
|
}},
|
|
{elvis_style, abc_size, #{
|
|
max_abc_size => 30
|
|
}},
|
|
{elvis_style, dont_repeat_yourself, #{
|
|
min_complexity => 15
|
|
}},
|
|
{elvis_style, no_common_caveats_call, #{
|
|
caveat_functions => [
|
|
{erlang, binary_to_atom, 1},
|
|
{erlang, binary_to_atom, 2}
|
|
]
|
|
}},
|
|
{elvis_style, max_record_fields, #{
|
|
max_fields => 20
|
|
}},
|
|
{elvis_style, max_map_type_keys, #{
|
|
max_keys => 20
|
|
}},
|
|
{elvis_text_style, no_tabs, #{}},
|
|
{elvis_text_style, no_trailing_whitespace, #{}},
|
|
{elvis_style, macro_naming_convention, #{}},
|
|
{elvis_style, operator_spaces, #{
|
|
rules => [
|
|
{right, "++"},
|
|
{left, "++"},
|
|
{right, "="},
|
|
{left, "="},
|
|
{right, "+"},
|
|
{left, "+"},
|
|
{right, "-"},
|
|
{left, "-"},
|
|
{right, "*"},
|
|
{left, "*"},
|
|
{right, "/"},
|
|
{left, "/"},
|
|
{right, "=<"},
|
|
{left, "=<"},
|
|
{right, "<"},
|
|
{left, "<"},
|
|
{right, ">"},
|
|
{left, ">"},
|
|
{right, ">="},
|
|
{left, ">="},
|
|
{right, "=="},
|
|
{left, "=="},
|
|
{right, "=:="},
|
|
{left, "=:="},
|
|
{right, "/="},
|
|
{left, "/="},
|
|
{right, "=/="},
|
|
{left, "=/="},
|
|
{right, "--"},
|
|
{left, "--"},
|
|
{right, "=>"},
|
|
{left, "=>"},
|
|
{right, ":="},
|
|
{left, ":="},
|
|
{right, "<-"},
|
|
{left, "<-"},
|
|
{right, "<="},
|
|
{left, "<="},
|
|
{right, "||"},
|
|
{left, "||"},
|
|
{right, "|"},
|
|
{left, "|"},
|
|
{right, "::"},
|
|
{left, "::"},
|
|
{right, "->"},
|
|
{left, "->"},
|
|
{right, ","},
|
|
{right, "!"},
|
|
{left, "!"},
|
|
{right, "?="},
|
|
{left, "?="},
|
|
{right, ";"},
|
|
{right, "<:="},
|
|
{left, "<:="},
|
|
{right, "<:-"},
|
|
{left, "<:-"},
|
|
{right, "&&"},
|
|
{left, "&&"}
|
|
]
|
|
}},
|
|
{elvis_style, no_used_ignored_variables, #{}},
|
|
{elvis_style, no_behavior_info, #{}}
|
|
]
|
|
},
|
|
#{
|
|
files => ["test/*.erl"],
|
|
ruleset => erl_files_test,
|
|
rules => [
|
|
{elvis_style, prefer_sigils, disable},
|
|
{elvis_style, prefer_strict_generators, disable},
|
|
{elvis_style, state_record_and_type, disable},
|
|
{elvis_style, no_init_lists, disable},
|
|
{elvis_style, consistent_ok_error_spec, disable},
|
|
{elvis_style, prefer_unquoted_atoms, disable},
|
|
{elvis_text_style, max_line_length, #{
|
|
limit => 100,
|
|
skip_comments => whole_line,
|
|
no_whitespace_after_limit => true
|
|
}},
|
|
{elvis_text_style, no_redundant_blank_lines, #{
|
|
max_lines => 1
|
|
}},
|
|
{elvis_style, max_function_length, #{
|
|
max_length => 70,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_function_clause_length, #{
|
|
max_length => 60,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_anonymous_function_length, #{
|
|
max_length => 30,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_anonymous_function_clause_length, #{
|
|
max_length => 30,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, max_function_arity, #{
|
|
max_arity => 7,
|
|
non_exported_max_arity => 8
|
|
}},
|
|
{elvis_style, max_anonymous_function_arity, #{
|
|
max_arity => 6
|
|
}},
|
|
{elvis_style, max_module_length, #{
|
|
max_length => 1000,
|
|
count_comments => false,
|
|
count_whitespace => false
|
|
}},
|
|
{elvis_style, no_deep_nesting, #{
|
|
level => 3
|
|
}},
|
|
{elvis_style, code_complexity, #{
|
|
max_complexity => 20
|
|
}},
|
|
{elvis_style, abc_size, #{
|
|
max_abc_size => 30
|
|
}},
|
|
{elvis_style, no_common_caveats_call, #{
|
|
caveat_functions => [
|
|
{erlang, binary_to_atom, 1},
|
|
{erlang, binary_to_atom, 2}
|
|
]
|
|
}},
|
|
{elvis_text_style, no_tabs, #{}},
|
|
{elvis_text_style, no_trailing_whitespace, #{}}
|
|
]
|
|
},
|
|
#{
|
|
files => ["rebar.config"],
|
|
ruleset => rebar_config,
|
|
rules => []
|
|
}
|
|
]}
|
|
].
|