-
Notifications
You must be signed in to change notification settings - Fork 428
/
Copy pathelvis.config
76 lines (74 loc) · 4.68 KB
/
elvis.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[
{
elvis,
[
{config,
[#{dirs => ["src"],
filter => "*.erl",
ruleset => erl_files,
ignore => ['XmppAddr', acl, adhoc, amp, amp_resolver, amp_strategy, cert_utils, ejabberd,
ejabberd_admin, ejabberd_app, ejabberd_cowboy, ejabberd_ctl, ejabberd_local,
ejabberd_router, ejabberd_s2s, ejabberd_s2s_in, ejabberd_s2s_out,
ejabberd_service, ejabberd_sm, ejabberd_sm_cets, ejabberd_sm_mnesia,
ejabberd_sm_redis, ejabberd_sup, eldap_filter, eldap_filter_yecc, eldap_pool,
eldap_utils, gdpr_api, gen_hook, gen_iq_handler, gen_mod, gen_mod_deps, jlib,
just_tls, mnesia_api, mod_adhoc, mod_amp, mod_auth_token_rdbms, mod_bind2,
mod_bosh, mod_bosh_socket, mod_cache_users, mod_caps, mod_caps_mnesia,
mod_carboncopy, mod_csi, mod_disco, mod_domain_isolation, mod_extdisco,
mongoose_data_forms, mongoose_disco, mod_last_mnesia, mod_last_rdbms, mod_ping,
mod_presence, mod_private, mod_private_mnesia, mod_private_rdbms,
mod_push_service_mongoosepush, mod_register, mod_sasl2, mod_sic, mod_time,
mod_websockets, mongoose_acc, mongoose_account_api, mongoose_amqp,
mongoose_api_common, mongoose_bin, mongoose_cets_discovery,
mongoose_cets_discovery_rdbms, mongoose_cleaner, mongoose_cluster,
mongoose_deprecations, mongoose_http_client, mongoose_instrument_probe_cets,
mongoose_iq_worker, mongoose_lib, mongoose_local_delivery, mongoose_mnesia,
mongoose_packet_handler, mongoose_privacy, mongoose_rabbit_worker, mongoose_redis,
mongoose_router_external, mongoose_router_external_localnode,
mongoose_router_global, mongoose_router_localdomain, mongoose_scram,
mongoose_server_api, mongoose_session_api, mongoose_start_node_id, mongoose_tls,
mongoose_transport, mongoose_user_cache, mongoose_xmpp_errors, monitored_map,
translate, tr_util, mod_last],
rules => [{elvis_text_style, line_length, #{limit => 100,
skip_comments => false}},
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}}
]
},
#{dirs => ["test", "test.disabled/mongoose_tests/tests"],
filter => "*.erl",
ruleset => erl_files,
ignore => [amp_SUITE, amp_gen, auth_dummy_SUITE, auth_http_SUITE, auth_internal_SUITE,
auth_jwt_SUITE, auth_tokens_SUITE, batches_SUITE, carboncopy_proper_tests_SUITE,
component_reg_SUITE, config_parser_SUITE, ejabberd_helper, ejabberd_sm_SUITE,
event_pusher_sns_SUITE, gen_hook_SUITE, gen_mod_SUITE, json_formatter_SUITE,
logger_helper, mam_misc_SUITE, migration_scripts_SUITE, mim_ct_rest,
mim_ct_rest_handler, mod_global_distrib_SUITE, mod_mam_SUITE,
mod_offline_mnesia_SUITE, mod_websockets_SUITE, mongoose_cleanup_SUITE,
mongoose_config_SUITE, mongoose_deprecations_SUITE, mongoose_domain_core_SUITE,
mongoose_graphql_SUITE, mongoose_instrument_SUITE,
mongoose_instrument_metrics_SUITE, mongoose_lazy_routing_SUITE,
mongoose_listener_SUITE, mongoose_rabbit_worker_SUITE, mongoose_rdbms_SUITE,
mongoose_subdomain_core_SUITE, mongoose_wpool_SUITE, mongooseim_loglevel_SUITE,
mongooseim_loglevel_SUITE_helper, muc_light_SUITE, privacy_SUITE,
pubsub_backend_SUITE, roster_SUITE, router_SUITE, safely_SUITE, translate_SUITE,
xmlel_gen, acl_SUITE],
rules => [{elvis_text_style, line_length, #{limit => 100,
skip_comments => false}},
{elvis_style, invalid_dynamic_call, disable},
{elvis_style, no_debug_call, disable},
{elvis_style, no_spec_with_records, disable},
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}},
%% Allow usage of macros like "?_assert_equal_extra".
{elvis_style, used_ignored_variable, disable},
%% Allow usage of ?assertMatch and similar macros, since after expanding they
%% result in use of variables like __X and __V that wouldn't be permitted by
%% default regex.
{elvis_style, variable_naming_convention, #{regex => "^(_?[A-Z][0-9a-zA-Z_]*)$"}},
{elvis_style, macro_names, disable}
]
}
]
}
]
}
].