Last active
April 22, 2018 12:14
-
-
Save RodionGork/0768de70cff3d19ab3c355149f6806c0 to your computer and use it in GitHub Desktop.
elvis in rebar3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{erl_opts, [debug_info]}. | |
{deps, []}. | |
{profiles, [ | |
{test, [ | |
{deps, [ | |
{meck, "0.8.8"} | |
]}, | |
{plugins, [ | |
{rebar3_lint, {git, "https://github.com/project-fifo/rebar3_lint.git", {tag, "0.1.2"}}} | |
]}, | |
{provider_hooks, [{pre, [{compile, {default, lint}}]}]} | |
]} | |
]}. | |
{elvis, | |
[#{dirs => ["apps/*/src", "src"], | |
filter => "*.erl", | |
rules => [{elvis_style, line_length, | |
#{ignore => [], | |
limit => 80, | |
skip_comments => false}}, | |
{elvis_style, no_tabs}, | |
{elvis_style, no_trailing_whitespace}, | |
{elvis_style, macro_names, #{ignore => []}}, | |
{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 => []}}, | |
{elvis_style, no_if_expression}, | |
{elvis_style, invalid_dynamic_call, | |
#{ignore => []}}, | |
{elvis_style, used_ignored_variable}, | |
{elvis_style, no_behavior_info}, | |
{ | |
elvis_style, | |
module_naming_convention, | |
#{regex => "^[a-z]([a-z0-9]*_?)*(_SUITE)?$", | |
ignore => []} | |
}, | |
{ | |
elvis_style, | |
function_naming_convention, | |
#{regex => "^([a-z][a-z0-9]*_?)*$"} | |
}, | |
{elvis_style, state_record_and_type}, | |
{elvis_style, no_spec_with_records}, | |
{elvis_style, dont_repeat_yourself, #{min_complexity => 10}} | |
] | |
} | |
] | |
}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{erl_opts, [debug_info]}.
{deps, []}.
{profiles, [
{test, [
{deps, [
{meck, "0.8.8"},
{elvis_core, {git, "https://github.com/inaka/elvis_core", {branch, "master"}}}
]},
{pre_hooks, [{compile, "erl -pa _build/test/lib/*/ebin -noshell -eval 'init:stop(case elvis_core:rock() of ok -> 0; _ -> 1 end)'"}]}
]}
]}.