Software /
code /
prosody
Annotate
.luacheckrc @ 8568:37d98a5fbb77
luacheckrc: Remove allowance legacy module() related globals
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 07 Mar 2018 19:20:31 +0100 |
parent | 8567:93695bb1f0e7 |
child | 8569:f88bd2428bc2 |
rev | line source |
---|---|
6667
e4338c0f739a
.luacheckrc: Commit initial config for luacheck
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 cache = true |
e4338c0f739a
.luacheckrc: Commit initial config for luacheck
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 allow_defined_top = true |
e4338c0f739a
.luacheckrc: Commit initial config for luacheck
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 unused_secondaries = false |
e4338c0f739a
.luacheckrc: Commit initial config for luacheck
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 codes = true |
7953
d183ff55442f
luacheckrc: Ignore shadowing of logger
Kim Alvefur <zash@zash.se>
parents:
7952
diff
changeset
|
5 ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log" } |
6750
2a2eb30b1ed4
luacheckrc: Allow plugins to implement functions under module.* (module.load, etc.)
Matthew Wild <mwild1@gmail.com>
parents:
6667
diff
changeset
|
6 |
7948
ed99a8e3c260
luacheckrc: Set max line length to 150 for now [luacheck]
Kim Alvefur <zash@zash.se>
parents:
7872
diff
changeset
|
7 max_line_length = 150 |
ed99a8e3c260
luacheckrc: Set max line length to 150 for now [luacheck]
Kim Alvefur <zash@zash.se>
parents:
7872
diff
changeset
|
8 |
8567
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
9 read_globals = { |
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
10 "prosody", |
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
11 "hosts", |
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
12 "import", |
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
13 }; |
7872
3105d35cc2c2
luacheckrc: Allow mutating the global prosody and hosts tables in core/ (luacheck 0.18 adds detection of indirect mutation)
Kim Alvefur <zash@zash.se>
parents:
7479
diff
changeset
|
14 files["core/"] = { |
8567
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
15 globals = { |
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
16 "prosody.hosts.?", |
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
17 "hosts.?", |
93695bb1f0e7
luacheckrc: Reflow globals settings
Kim Alvefur <zash@zash.se>
parents:
8557
diff
changeset
|
18 }; |
7872
3105d35cc2c2
luacheckrc: Allow mutating the global prosody and hosts tables in core/ (luacheck 0.18 adds detection of indirect mutation)
Kim Alvefur <zash@zash.se>
parents:
7479
diff
changeset
|
19 } |
8381
7f6184474149
luacheckrc: Ignore long commets (e.g. license in util.sasl)
Kim Alvefur <zash@zash.se>
parents:
8239
diff
changeset
|
20 files["util/"] = { |
7f6184474149
luacheckrc: Ignore long commets (e.g. license in util.sasl)
Kim Alvefur <zash@zash.se>
parents:
8239
diff
changeset
|
21 -- Ignore unwrapped license text |
7f6184474149
luacheckrc: Ignore long commets (e.g. license in util.sasl)
Kim Alvefur <zash@zash.se>
parents:
8239
diff
changeset
|
22 max_comment_line_length = false; |
7f6184474149
luacheckrc: Ignore long commets (e.g. license in util.sasl)
Kim Alvefur <zash@zash.se>
parents:
8239
diff
changeset
|
23 } |
6750
2a2eb30b1ed4
luacheckrc: Allow plugins to implement functions under module.* (module.load, etc.)
Matthew Wild <mwild1@gmail.com>
parents:
6667
diff
changeset
|
24 files["plugins/"] = { |
7952
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
25 read_globals = { |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
26 -- Module instance |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
27 "module.name", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
28 "module.host", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
29 "module._log", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
30 "module.log", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
31 "module.event_handlers", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
32 "module.reloading", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
33 "module.saved_state", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
34 "module.global", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
35 "module.path", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
36 |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
37 -- Module API |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
38 "module.add_extension", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
39 "module.add_feature", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
40 "module.add_identity", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
41 "module.add_item", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
42 "module.add_timer", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
43 "module.broadcast", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
44 "module.context", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
45 "module.depends", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
46 "module.fire_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
47 "module.get_directory", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
48 "module.get_host", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
49 "module.get_host_items", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
50 "module.get_host_type", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
51 "module.get_name", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
52 "module.get_option", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
53 "module.get_option_array", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
54 "module.get_option_boolean", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
55 "module.get_option_inherited_set", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
56 "module.get_option_number", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
57 "module.get_option_path", |
7981
bbb900cfcfa5
luacheckrc: Add module:get_option_scalar to known globals
Kim Alvefur <zash@zash.se>
parents:
7953
diff
changeset
|
58 "module.get_option_scalar", |
7952
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
59 "module.get_option_set", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
60 "module.get_option_string", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
61 "module.handle_items", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
62 "module.hook", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
63 "module.hook_global", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
64 "module.hook_object_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
65 "module.hook_tag", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
66 "module.load_resource", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
67 "module.measure", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
68 "module.measure_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
69 "module.measure_global_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
70 "module.measure_object_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
71 "module.open_store", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
72 "module.provides", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
73 "module.remove_item", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
74 "module.require", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
75 "module.send", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
76 "module.set_global", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
77 "module.shared", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
78 "module.unhook", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
79 "module.unhook_object_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
80 "module.wrap_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
81 "module.wrap_global", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
82 "module.wrap_object_event", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
83 }; |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
84 globals = { |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
85 -- Methods that can be set on module API |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
86 "module.unload", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
87 "module.add_host", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
88 "module.load", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
89 "module.add_host", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
90 "module.save", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
91 "module.restore", |
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
92 "module.command", |
8048
75e37366a03f
luacheckrc: Declare module.environment as writable (thanks Link Mauve)
Kim Alvefur <zash@zash.se>
parents:
7981
diff
changeset
|
93 "module.environment", |
7952
38053bf1630d
luacheckrc: Include entire module API
Kim Alvefur <zash@zash.se>
parents:
7949
diff
changeset
|
94 }; |
6750
2a2eb30b1ed4
luacheckrc: Allow plugins to implement functions under module.* (module.load, etc.)
Matthew Wild <mwild1@gmail.com>
parents:
6667
diff
changeset
|
95 } |
8239
20e3d5689cce
.luacheckrc: Add busted globals for spec/* (thanks av6!)
Matthew Wild <mwild1@gmail.com>
parents:
8048
diff
changeset
|
96 files["spec/"] = { |
20e3d5689cce
.luacheckrc: Add busted globals for spec/* (thanks av6!)
Matthew Wild <mwild1@gmail.com>
parents:
8048
diff
changeset
|
97 std = "+busted" |
7476
42d8955be784
luacheckrc: Ignore assert helper functions used in tests/*
Kim Alvefur <zash@zash.se>
parents:
6986
diff
changeset
|
98 } |
8557
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
99 files["prosody.cfg.lua"] = { |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
100 globals = { |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
101 "Host", |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
102 "host", |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
103 "VirtualHost", |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
104 "Component", |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
105 "component", |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
106 "Include", |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
107 "include", |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
108 "RunScript" |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
109 }; |
28f9b8a5d9cb
luacheckrc: Declare known global functions in config file
Kim Alvefur <zash@zash.se>
parents:
8533
diff
changeset
|
110 } |