Software /
code /
prosody
Changeset
6663:d3023dd07cb6
portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 06 May 2015 19:20:07 +0100 |
parents | 6662:5ef319efedba |
children | 6664:5466f24e51c9 |
files | core/portmanager.lua core/s2smanager.lua core/sessionmanager.lua core/stanza_router.lua core/storagemanager.lua core/usermanager.lua util/xml.lua |
diffstat | 7 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/core/portmanager.lua Wed May 06 19:17:59 2015 +0100 +++ b/core/portmanager.lua Wed May 06 19:20:07 2015 +0100 @@ -41,7 +41,7 @@ --- Private helpers -local function error_to_friendly_message(service_name, port, err) +local function error_to_friendly_message(service_name, port, err) --luacheck: ignore 212/service_name local friendly_message = err; if err:match(" in use") then -- FIXME: Use service_name here
--- a/core/s2smanager.lua Wed May 06 19:17:59 2015 +0100 +++ b/core/s2smanager.lua Wed May 06 19:20:07 2015 +0100 @@ -49,11 +49,11 @@ close = function (session) session.log("debug", "Attempt to close already-closed session"); end; - filter = function (type, data) return data; end; + filter = function (type, data) return data; end; --luacheck: ignore 212/type }; resting_session.__index = resting_session; function retire_session(session, reason) - local log = session.log or log; + local log = session.log or log; --luacheck: ignore 431/log for k in pairs(session) do if k ~= "log" and k ~= "id" and k ~= "conn" then session[k] = nil;
--- a/core/sessionmanager.lua Wed May 06 19:17:59 2015 +0100 +++ b/core/sessionmanager.lua Wed May 06 19:20:07 2015 +0100 @@ -54,11 +54,11 @@ close = function (session) session.log("debug", "Attempt to close already-closed session"); end; - filter = function (type, data) return data; end; + filter = function (type, data) return data; end; --luacheck: ignore 212/type }; resting_session.__index = resting_session; function retire_session(session) - local log = session.log or log; + local log = session.log or log; --luacheck: ignore 431/log for k in pairs(session) do if k ~= "log" and k ~= "id" then session[k] = nil;
--- a/core/stanza_router.lua Wed May 06 19:17:59 2015 +0100 +++ b/core/stanza_router.lua Wed May 06 19:20:07 2015 +0100 @@ -30,7 +30,7 @@ deprecated_warning"core_route_stanza"; local valid_stanzas = { message = true, presence = true, iq = true }; -local function handle_unhandled_stanza(host, origin, stanza) +local function handle_unhandled_stanza(host, origin, stanza) --luacheck: ignore 212/host local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns or "jabber:client", origin.type; if xmlns == "jabber:client" and valid_stanzas[name] then -- A normal stanza @@ -221,6 +221,8 @@ end end end + +--luacheck: ignore 122/prosody prosody.core_process_stanza = core_process_stanza; prosody.core_post_stanza = core_post_stanza; prosody.core_route_stanza = core_route_stanza;
--- a/core/storagemanager.lua Wed May 06 19:17:59 2015 +0100 +++ b/core/storagemanager.lua Wed May 06 19:20:07 2015 +0100 @@ -23,7 +23,7 @@ name = "null", open = function (self) return self; end }, { - __index = function (self, method) + __index = function (self, method) --luacheck: ignore 212 return null_storage_method; end }
--- a/core/usermanager.lua Wed May 06 19:17:59 2015 +0100 +++ b/core/usermanager.lua Wed May 06 19:20:07 2015 +0100 @@ -29,7 +29,7 @@ local function dummy() return nil, "method not implemented"; end; local function dummy_get_sasl_handler() return sasl_new(nil, {}); end return setmetatable({name = "null", get_sasl_handler = dummy_get_sasl_handler}, { - __index = function(self, method) return dummy; end + __index = function(self, method) return dummy; end --luacheck: ignore 212 }); end
--- a/util/xml.lua Wed May 06 19:17:59 2015 +0100 +++ b/util/xml.lua Wed May 06 19:20:07 2015 +0100 @@ -11,6 +11,7 @@ local ns_separator = "\1"; local ns_pattern = "^([^"..ns_separator.."]*)"..ns_separator.."?(.*)$"; return function(xml) + --luacheck: ignore 212/self local handler = {}; local stanza = st.stanza("root"); function handler:StartElement(tagname, attr)