jesse/elvis.config
2016-03-18 13:33:52 +01:00

81 lines
3.9 KiB
Erlang

%%-*- mode: erlang -*-
[{ elvis
, [{ config
, [#{ dirs => ["src", "test"]
, filter => "*.erl"
, rules => [ {elvis_style, line_length, #{ limit => 80
, skip_comments => false
}}
, {elvis_style, no_tabs}
, {elvis_style, no_trailing_whitespace}
, {elvis_style, macro_names}
, {elvis_style, macro_module_names}
, {elvis_style, operator_spaces, #{rules => [ {right, ","}
, {right, "++"}
, {left, "++"}
]}}
, {elvis_style, nesting_level, #{level => 4}} % see https://github.com/inaka/elvis/issues/361
, {elvis_style, god_modules, #{limit => 25}}
, {elvis_style, no_if_expression}
, {elvis_style, invalid_dynamic_call, #{ ignore => [elvis]
}}
, {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]*_?)*(_SUITE)?$"
%% , ignore => []
%% }
%% }
, { elvis_style
, variable_naming_convention
, #{ regex => "^([A-Z][0-9a-zA-Z_]*|_[A-Z])$" % "^([A-Z][0-9a-zA-Z]*)$" FIXME
, ignore => []
}
}
, {elvis_style, state_record_and_type}
, {elvis_style, no_spec_with_records}
, {elvis_style, dont_repeat_yourself, #{ min_complexity => 250 % 10 FIXME
}}
, {elvis_style, max_module_length, #{ max_length => 1500
, ignore => []
, count_comments => true
, count_whitespace => false
}}
, {elvis_style, max_function_length, #{ max_length => 250
, count_comments => true
, count_whitespace => false
}}
, {elvis_style, no_debug_call, #{ debug_functions => [ {ct, pal}
, {io, format, 1}
, {io, format, 2}
]
, ignore => [jesse_tests_util]
}}
]
}
, #{ dirs => ["."]
, filter => "Makefile"
, rules => [ {elvis_project, no_deps_master_erlang_mk, #{ignore => []}}
]
}
, #{ dirs => ["."]
, filter => "rebar.config"
, rules => [ {elvis_project, no_deps_master_rebar, #{ignore => []}}
]
}
, #{ dirs => ["."]
, filter => "elvis.config"
, rules => [ {elvis_project, old_configuration_format}
]
}
]
}]
}].