aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-05-06 19:20:07 +0100
committerMatthew Wild <mwild1@gmail.com>2015-05-06 19:20:07 +0100
commit7b3df2bae66c5081cb53c82f93546b1f28549611 (patch)
treee4a6f2bf57f84ac2a2f384a6953f2a616b83bb8c /core
parent59c9585f12bbe887886947cd9e878a018e55a59a (diff)
downloadprosody-7b3df2bae66c5081cb53c82f93546b1f28549611.tar.gz
prosody-7b3df2bae66c5081cb53c82f93546b1f28549611.zip
portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations
Diffstat (limited to 'core')
-rw-r--r--core/portmanager.lua2
-rw-r--r--core/s2smanager.lua4
-rw-r--r--core/sessionmanager.lua4
-rw-r--r--core/stanza_router.lua4
-rw-r--r--core/storagemanager.lua2
-rw-r--r--core/usermanager.lua2
6 files changed, 10 insertions, 8 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index eab2412a..bbb7c215 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -41,7 +41,7 @@ local active_services = multitable.new();
--- 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
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 59c1831b..a3a8702a 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -49,11 +49,11 @@ local resting_session = { -- Resting, not dead
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;
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index d833dbe5..5e4e2991 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -54,11 +54,11 @@ local resting_session = { -- Resting, not dead
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;
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 8e86b16f..55c94bf4 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -30,7 +30,7 @@ deprecated_warning"core_process_stanza";
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 @@ function core_route_stanza(origin, stanza)
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;
diff --git a/core/storagemanager.lua b/core/storagemanager.lua
index ad31eb80..0b6679d8 100644
--- a/core/storagemanager.lua
+++ b/core/storagemanager.lua
@@ -23,7 +23,7 @@ local null_storage_driver = setmetatable(
name = "null",
open = function (self) return self; end
}, {
- __index = function (self, method)
+ __index = function (self, method) --luacheck: ignore 212
return null_storage_method;
end
}
diff --git a/core/usermanager.lua b/core/usermanager.lua
index 900531ca..3a2b23a2 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -29,7 +29,7 @@ function new_null_provider()
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