elvis.config 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. %% -*- mode: erlang -*-
  2. [
  3. {
  4. elvis,
  5. [
  6. {config,
  7. [
  8. #{dirs => ["src", "apps/**/src", "lib-ee/**/src"],
  9. filter => "*.erl",
  10. ruleset => erl_files,
  11. rules => [
  12. {elvis_style, state_record_and_type, disable},
  13. {elvis_style, no_common_caveats_call, #{}},
  14. {elvis_style, no_debug_call, #{ debug_functions => [ {ct, pal}
  15. , {ct, print}
  16. ]}},
  17. {elvis_style, operator_spaces, #{rules => [{right, "|"},
  18. {left, "|"},
  19. {right, "||"},
  20. {left, "||"}]}},
  21. {elvis_style, dont_repeat_yourself, #{ min_complexity => 20 }},
  22. {elvis_style, god_modules, #{ignore => [emqx_authentication,
  23. emqx_resource]}}
  24. ]
  25. },
  26. #{dirs => ["test", "apps/**/test"],
  27. filter => "*.erl",
  28. rules => [
  29. {elvis_text_style, line_length, #{ limit => 100
  30. , skip_comments => false }},
  31. {elvis_style, dont_repeat_yourself, #{ min_complexity => 100 }}
  32. ]
  33. },
  34. #{dirs => ["."],
  35. filter => "Makefile",
  36. ruleset => makefiles
  37. },
  38. #{dirs => ["."],
  39. filter => "rebar.config",
  40. ruleset => rebar_config
  41. },
  42. #{dirs => ["."],
  43. filter => "elvis.config",
  44. ruleset => elvis_config
  45. }
  46. ]
  47. }
  48. ]
  49. }
  50. ].