# HG changeset patch # User Kim Alvefur # Date 1488654568 -3600 # Node ID 8acc35b5355ab820b3d884a3a66ef99c8854652c # Parent ed99a8e3c2604dedb2fff733b985e811115ccb09 core: Allow select core modules to mutate some globals (needs luacheck 1.19) diff -r ed99a8e3c260 -r 8acc35b5355a .luacheckrc --- 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" }; diff -r ed99a8e3c260 -r 8acc35b5355a core/loggingmanager.lua --- 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 = diff -r ed99a8e3c260 -r 8acc35b5355a core/rostermanager.lua --- 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 diff -r ed99a8e3c260 -r 8acc35b5355a core/sessionmanager.lua --- 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;