Software /
code /
prosody
Changeset
8555:4f0f5b49bb03
vairious: Add annotation when an empty environment is set [luacheck]
line wrap: on
line diff
--- a/core/certmanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/certmanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -55,6 +55,7 @@ }; local _ENV = nil; +-- luacheck: std none -- Global SSL options if not overridden per-host local global_ssl_config = configmanager.get("*", "ssl");
--- a/core/configmanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/configmanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -24,6 +24,7 @@ local _M = {}; local _ENV = nil; +-- luacheck: std none _M.resolve_relative_path = resolve_relative_path; -- COMPAT
--- a/core/hostmanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/hostmanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -27,6 +27,7 @@ local setmetatable = setmetatable; local _ENV = nil; +-- luacheck: std none local host_mt = { } function host_mt:__tostring()
--- a/core/loggingmanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/loggingmanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -24,6 +24,7 @@ prosody.log = logger.init("general"); local _ENV = nil; +-- luacheck: std none -- The log config used if none specified in the config file (see reload_logging for initialization) local default_logging;
--- a/core/modulemanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/modulemanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -38,6 +38,7 @@ local _G = _G; local _ENV = nil; +-- luacheck: std none local load_modules_for_host, load, unload, reload, get_module, get_items; local get_modules, is_loaded, module_has_method, call_module_method;
--- a/core/portmanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/portmanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -15,6 +15,7 @@ local fire_event = prosody.events.fire_event; local _ENV = nil; +-- luacheck: std none --- Config
--- a/core/rostermanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/rostermanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -23,6 +23,7 @@ local storagemanager = require "core.storagemanager"; local _ENV = nil; +-- luacheck: std none local save_roster; -- forward declaration
--- a/core/s2smanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/s2smanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -23,6 +23,7 @@ local fire_event = prosody.events.fire_event; local _ENV = nil; +-- luacheck: std none local function new_incoming(conn) local session = { conn = conn, type = "s2sin_unauthed", direction = "incoming", hosts = {} };
--- a/core/sessionmanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/sessionmanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -26,6 +26,7 @@ local gettime = require "socket".gettime; local _ENV = nil; +-- luacheck: std none local function new_session(conn) local session = { conn = conn, type = "c2s_unauthed", conntime = gettime() };
--- a/core/storagemanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/storagemanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -12,6 +12,7 @@ local prosody = prosody; local _ENV = nil; +-- luacheck: std none local olddm = {}; -- maintain old datamanager, for backwards compatibility for k,v in pairs(datamanager) do olddm[k] = v; end
--- a/core/usermanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/core/usermanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -24,6 +24,7 @@ local default_provider = "internal_plain"; local _ENV = nil; +-- luacheck: std none local function new_null_provider() local function dummy() return nil, "method not implemented"; end;
--- a/net/adns.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/net/adns.lua Wed Feb 28 20:06:26 2018 +0100 @@ -17,6 +17,7 @@ local function dummy_send(sock, data, i, j) return (j-i)+1; end local _ENV = nil; +-- luacheck: std none local async_resolver_methods = {}; local async_resolver_mt = { __index = async_resolver_methods };
--- a/net/connlisteners.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/net/connlisteners.lua Wed Feb 28 20:06:26 2018 +0100 @@ -3,6 +3,7 @@ local traceback = debug.traceback; local _ENV = nil; +-- luacheck: std none local function fail() log("error", "Attempt to use legacy connlisteners API. For more info see https://prosody.im/doc/developers/network");
--- a/net/dns.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/net/dns.lua Wed Feb 28 20:06:26 2018 +0100 @@ -73,6 +73,7 @@ -------------------------------------------------- module dns local _ENV = nil; +-- luacheck: std none local dns = {};
--- a/net/http.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/net/http.lua Wed Feb 28 20:06:26 2018 +0100 @@ -27,6 +27,7 @@ local log = require "util.logger".init("http"); local _ENV = nil; +-- luacheck: std none local requests = {}; -- Open requests
--- a/net/httpserver.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/net/httpserver.lua Wed Feb 28 20:06:26 2018 +0100 @@ -3,6 +3,7 @@ local traceback = debug.traceback; local _ENV = nil; +-- luacheck: std none function fail() log("error", "Attempt to use legacy HTTP API. For more info see https://prosody.im/doc/developers/legacy_http");
--- a/net/server_epoll.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/net/server_epoll.lua Wed Feb 28 20:06:26 2018 +0100 @@ -28,6 +28,7 @@ assert(socket.tcp6 and socket.tcp4, "Incompatible LuaSocket version"); local _ENV = nil; +-- luacheck: std none local default_config = { __index = { read_timeout = 900;
--- a/util/caps.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/caps.lua Wed Feb 28 20:06:26 2018 +0100 @@ -13,6 +13,7 @@ local ipairs = ipairs; local _ENV = nil; +-- luacheck: std none local function calculate_hash(disco_info) local identities, features, extensions = {}, {}, {};
--- a/util/dataforms.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/dataforms.lua Wed Feb 28 20:06:26 2018 +0100 @@ -14,6 +14,7 @@ local jid_prep = require "util.jid".prep; local _ENV = nil; +-- luacheck: std none local xmlns_forms = 'jabber:x:data';
--- a/util/datamanager.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/datamanager.lua Wed Feb 28 20:06:26 2018 +0100 @@ -40,6 +40,7 @@ end); local _ENV = nil; +-- luacheck: std none ---- utils ----- local encode, decode, store_encode;
--- a/util/datetime.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/datetime.lua Wed Feb 28 20:06:26 2018 +0100 @@ -15,6 +15,7 @@ local tonumber = tonumber; local _ENV = nil; +-- luacheck: std none local function date(t) return os_date("!%Y-%m-%d", t);
--- a/util/events.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/events.lua Wed Feb 28 20:06:26 2018 +0100 @@ -15,6 +15,7 @@ local next = next; local _ENV = nil; +-- luacheck: std none local function new() -- Map event name to ordered list of handlers (lazily built): handlers[event_name] = array_of_handler_functions
--- a/util/filters.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/filters.lua Wed Feb 28 20:06:26 2018 +0100 @@ -9,6 +9,7 @@ local t_insert, t_remove = table.insert, table.remove; local _ENV = nil; +-- luacheck: std none local new_filter_hooks = {};
--- a/util/jid.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/jid.lua Wed Feb 28 20:06:26 2018 +0100 @@ -25,6 +25,7 @@ for k,v in pairs(escapes) do unescapes[v] = k; end local _ENV = nil; +-- luacheck: std none local function split(jid) if not jid then return; end
--- a/util/logger.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/logger.lua Wed Feb 28 20:06:26 2018 +0100 @@ -10,6 +10,7 @@ local pairs = pairs; local _ENV = nil; +-- luacheck: std none local level_sinks = {};
--- a/util/multitable.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/multitable.lua Wed Feb 28 20:06:26 2018 +0100 @@ -12,6 +12,7 @@ local unpack = table.unpack or unpack; --luacheck: ignore 113 143 local _ENV = nil; +-- luacheck: std none local function get(self, ...) local t = self.data;
--- a/util/sasl.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sasl.lua Wed Feb 28 20:06:26 2018 +0100 @@ -20,6 +20,7 @@ local require = require; local _ENV = nil; +-- luacheck: std none --[[ Authentication Backend Prototypes:
--- a/util/sasl/anonymous.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sasl/anonymous.lua Wed Feb 28 20:06:26 2018 +0100 @@ -15,6 +15,7 @@ local generate_uuid = require "util.uuid".generate; local _ENV = nil; +-- luacheck: std none --========================= --SASL ANONYMOUS according to RFC 4505
--- a/util/sasl/digest-md5.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sasl/digest-md5.lua Wed Feb 28 20:06:26 2018 +0100 @@ -26,6 +26,7 @@ local nodeprep = require "util.encodings".stringprep.nodeprep; local _ENV = nil; +-- luacheck: std none --========================= --SASL DIGEST-MD5 according to RFC 2831
--- a/util/sasl/external.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sasl/external.lua Wed Feb 28 20:06:26 2018 +0100 @@ -1,6 +1,7 @@ local saslprep = require "util.encodings".stringprep.saslprep; local _ENV = nil; +-- luacheck: std none local function external(self, message) message = saslprep(message);
--- a/util/sasl/plain.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sasl/plain.lua Wed Feb 28 20:06:26 2018 +0100 @@ -17,6 +17,7 @@ local log = require "util.logger".init("sasl"); local _ENV = nil; +-- luacheck: std none -- ================================ -- SASL PLAIN according to RFC 4616
--- a/util/sasl/scram.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sasl/scram.lua Wed Feb 28 20:06:26 2018 +0100 @@ -26,6 +26,7 @@ local byte = string.byte; local _ENV = nil; +-- luacheck: std none --========================= --SASL SCRAM-SHA-1 according to RFC 5802
--- a/util/sasl_cyrus.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sasl_cyrus.lua Wed Feb 28 20:06:26 2018 +0100 @@ -61,6 +61,7 @@ setmetatable(sasl_errstring, { __index = function() return "undefined error!" end }); local _ENV = nil; +-- luacheck: std none local method = {}; method.__index = method;
--- a/util/serialization.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/serialization.lua Wed Feb 28 20:06:26 2018 +0100 @@ -21,6 +21,7 @@ local envload = require"util.envload".envload; local _ENV = nil; +-- luacheck: std none local indent = function(i) return string_rep("\t", i);
--- a/util/set.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/set.lua Wed Feb 28 20:06:26 2018 +0100 @@ -11,6 +11,7 @@ local t_concat = table.concat; local _ENV = nil; +-- luacheck: std none local set_mt = { __name = "set" }; function set_mt.__call(set, _, k)
--- a/util/sql.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sql.lua Wed Feb 28 20:06:26 2018 +0100 @@ -14,6 +14,7 @@ local build_url = require "socket.url".build; local _ENV = nil; +-- luacheck: std none local column_mt = {}; local table_mt = {};
--- a/util/sslconfig.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/sslconfig.lua Wed Feb 28 20:06:26 2018 +0100 @@ -8,6 +8,7 @@ local setmetatable = setmetatable; local _ENV = nil; +-- luacheck: std none local handlers = { }; local finalisers = { };
--- a/util/stanza.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/stanza.lua Wed Feb 28 20:06:26 2018 +0100 @@ -37,6 +37,7 @@ local xmlns_stanzas = "urn:ietf:params:xml:ns:xmpp-stanzas"; local _ENV = nil; +-- luacheck: std none local stanza_mt = { __name = "stanza" }; stanza_mt.__index = stanza_mt;
--- a/util/template.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/template.lua Wed Feb 28 20:06:26 2018 +0100 @@ -10,6 +10,7 @@ local parse_xml = require "util.xml".parse; local _ENV = nil; +-- luacheck: std none local function trim_xml(stanza) for i=#stanza,1,-1 do
--- a/util/termcolours.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/termcolours.lua Wed Feb 28 20:06:26 2018 +0100 @@ -26,6 +26,7 @@ local orig_color = windows and windows.get_consolecolor and windows.get_consolecolor(); local _ENV = nil; +-- luacheck: std none local stylemap = { reset = 0; bright = 1, dim = 2, underscore = 4, blink = 5, reverse = 7, hidden = 8;
--- a/util/throttle.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/throttle.lua Wed Feb 28 20:06:26 2018 +0100 @@ -3,6 +3,7 @@ local setmetatable = setmetatable; local _ENV = nil; +-- luacheck: std none local throttle = {}; local throttle_mt = { __index = throttle };
--- a/util/timer.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/timer.lua Wed Feb 28 20:06:26 2018 +0100 @@ -16,6 +16,7 @@ local xpcall = xpcall; local _ENV = nil; +-- luacheck: std none local _add_task = server.add_task;
--- a/util/watchdog.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/watchdog.lua Wed Feb 28 20:06:26 2018 +0100 @@ -3,6 +3,7 @@ local os_time = os.time; local _ENV = nil; +-- luacheck: std none local watchdog_methods = {}; local watchdog_mt = { __index = watchdog_methods };
--- a/util/x509.lua Wed Feb 28 18:12:20 2018 +0100 +++ b/util/x509.lua Wed Feb 28 20:06:26 2018 +0100 @@ -25,6 +25,7 @@ local s_format = string.format; local _ENV = nil; +-- luacheck: std none local oid_commonname = "2.5.4.3"; -- [LDAP] 2.3 local oid_subjectaltname = "2.5.29.17"; -- [PKIX] 4.2.1.6