util.encodings: Spell out all IDNA 2008 options ICU has
[prosody.git] / .luacheckrc
blobf6760ee3ab4d7569ce27b03b5de000e1f222db11
1 cache = true
2 codes = true
3 ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log", }
5 std = "lua53c"
6 max_line_length = 150
8 read_globals = {
9         "prosody",
10         "import",
12 files["prosody"] = {
13         allow_defined_top = true;
14         module = true;
16 files["prosodyctl"] = {
17         allow_defined_top = true;
18         module = true;
20 files["core/"] = {
21         globals = {
22                 "prosody.hosts.?",
23         };
25 files["util/"] = {
26         -- Ignore unwrapped license text
27         max_comment_line_length = false;
29 files["plugins/"] = {
30         module = true;
31         allow_defined_top = true;
32         read_globals = {
33                 -- Module instance
34                 "module.name",
35                 "module.host",
36                 "module._log",
37                 "module.event_handlers",
38                 "module.reloading",
39                 "module.saved_state",
40                 "module.global",
41                 "module.path",
43                 -- Module API
44                 "module.add_extension",
45                 "module.add_feature",
46                 "module.add_identity",
47                 "module.add_item",
48                 "module.add_timer",
49                 "module.broadcast",
50                 "module.context",
51                 "module.depends",
52                 "module.fire_event",
53                 "module.get_directory",
54                 "module.get_host",
55                 "module.get_host_items",
56                 "module.get_host_type",
57                 "module.get_name",
58                 "module.get_option",
59                 "module.get_option_array",
60                 "module.get_option_boolean",
61                 "module.get_option_inherited_set",
62                 "module.get_option_number",
63                 "module.get_option_path",
64                 "module.get_option_scalar",
65                 "module.get_option_set",
66                 "module.get_option_string",
67                 "module.get_status",
68                 "module.handle_items",
69                 "module.hook",
70                 "module.hook_global",
71                 "module.hook_object_event",
72                 "module.hook_tag",
73                 "module.load_resource",
74                 "module.log",
75                 "module.log_status",
76                 "module.measure",
77                 "module.measure_event",
78                 "module.measure_global_event",
79                 "module.measure_object_event",
80                 "module.open_store",
81                 "module.provides",
82                 "module.remove_item",
83                 "module.require",
84                 "module.send",
85                 "module.send_iq",
86                 "module.set_global",
87                 "module.set_status",
88                 "module.shared",
89                 "module.unhook",
90                 "module.unhook_object_event",
91                 "module.wrap_event",
92                 "module.wrap_global",
93                 "module.wrap_object_event",
95                 -- mod_http API
96                 "module.http_url",
97         };
98         globals = {
99                 -- Methods that can be set on module API
100                 "module.unload",
101                 "module.add_host",
102                 "module.load",
103                 "module.add_host",
104                 "module.save",
105                 "module.restore",
106                 "module.command",
107                 "module.environment",
108         };
110 files["spec/"] = {
111         std = "+busted";
112         globals = { "randomize" };
114 files["prosody.cfg.lua"] = {
115         ignore = { "131" };
116         globals = {
117                 "Host",
118                 "host",
119                 "VirtualHost",
120                 "Component",
121                 "component",
122                 "Include",
123                 "include",
124                 "RunScript"
125         };
128 if os.getenv("PROSODY_STRICT_LINT") ~= "1" then
129         -- These files have not yet been brought up to standard
130         -- Do not add more files here, but do help us fix these!
131         unused_secondaries = false
133         local exclude_files = {
134                 "doc/net.server.lua";
136                 "fallbacks/bit.lua";
137                 "fallbacks/lxp.lua";
139                 "net/cqueues.lua";
140                 "net/dns.lua";
141                 "net/server_select.lua";
143                 "plugins/mod_storage_sql1.lua";
145                 "spec/core_configmanager_spec.lua";
146                 "spec/core_moduleapi_spec.lua";
147                 "spec/net_http_parser_spec.lua";
148                 "spec/util_events_spec.lua";
149                 "spec/util_http_spec.lua";
150                 "spec/util_ip_spec.lua";
151                 "spec/util_multitable_spec.lua";
152                 "spec/util_rfc6724_spec.lua";
153                 "spec/util_throttle_spec.lua";
154                 "spec/util_xmppstream_spec.lua";
156                 "tools/ejabberd2prosody.lua";
157                 "tools/ejabberdsql2prosody.lua";
158                 "tools/erlparse.lua";
159                 "tools/jabberd14sql2prosody.lua";
160                 "tools/migration/migrator.cfg.lua";
161                 "tools/migration/migrator/jabberd14.lua";
162                 "tools/migration/migrator/mtools.lua";
163                 "tools/migration/migrator/prosody_files.lua";
164                 "tools/migration/migrator/prosody_sql.lua";
165                 "tools/migration/prosody-migrator.lua";
166                 "tools/openfire2prosody.lua";
167                 "tools/xep227toprosody.lua";
169                 "util/sasl/digest-md5.lua";
170         }
171         for _, file in ipairs(exclude_files) do
172                 files[file] = { only = {} }
173         end