Software /
code /
prosody
Changeset
7949:8acc35b5355a
core: Allow select core modules to mutate some globals (needs luacheck 1.19)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 Mar 2017 20:09:28 +0100 |
parents | 7948:ed99a8e3c260 |
children | 7950:f91e7ec9654e 7951:2b91da49285a |
files | .luacheckrc core/loggingmanager.lua core/rostermanager.lua core/sessionmanager.lua |
diffstat | 4 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/.luacheckrc Sat Mar 04 20:06:29 2017 +0100 +++ b/.luacheckrc Sat Mar 04 20:09:28 2017 +0100 @@ -10,7 +10,8 @@ max_line_length = 150 files["core/"] = { - ignore = { "122/prosody", "122/hosts" }; + read_globals = { "prosody", "hosts" }; + globals = { "prosody.hosts.?", "hosts.?" }; } files["plugins/"] = { globals = { "module" };
--- a/core/loggingmanager.lua Sat Mar 04 20:06:29 2017 +0100 +++ b/core/loggingmanager.lua Sat Mar 04 20:09:28 2017 +0100 @@ -5,7 +5,7 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- - +-- luacheck: globals log prosody.log local format = string.format; local setmetatable, rawset, pairs, ipairs, type =
--- a/core/rostermanager.lua Sat Mar 04 20:06:29 2017 +0100 +++ b/core/rostermanager.lua Sat Mar 04 20:09:28 2017 +0100 @@ -5,7 +5,7 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- - +-- luacheck: globals prosody.bare_sessions.?.roster
--- a/core/sessionmanager.lua Sat Mar 04 20:06:29 2017 +0100 +++ b/core/sessionmanager.lua Sat Mar 04 20:09:28 2017 +0100 @@ -5,6 +5,7 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- +-- luacheck: globals prosody.full_sessions prosody.bare_sessions local tostring, setmetatable = tostring, setmetatable; local pairs, next= pairs, next;