mod_websocket: Silence the one warning instead of ignoring the entire file
authorKim Alvefur <zash@zash.se>
Sun, 30 Sep 2018 17:55:13 +0200
changeset 9418 02155a10c5e9
parent 9417 a48579a7b709
child 9419 15cd0d9cde7c
mod_websocket: Silence the one warning instead of ignoring the entire file
.luacheckrc
plugins/mod_websocket.lua
--- a/.luacheckrc	Sun Sep 30 17:54:09 2018 +0200
+++ b/.luacheckrc	Sun Sep 30 17:55:13 2018 +0200
@@ -140,7 +140,6 @@
 	"plugins/mod_privacy.lua";
 	"plugins/mod_storage_sql1.lua";
 	"plugins/mod_storage_sql.lua";
-	"plugins/mod_websocket.lua";
 
 	"spec/core_configmanager_spec.lua";
 	"spec/core_moduleapi_spec.lua";
--- a/plugins/mod_websocket.lua	Sun Sep 30 17:54:09 2018 +0200
+++ b/plugins/mod_websocket.lua	Sun Sep 30 17:55:13 2018 +0200
@@ -95,6 +95,8 @@
 		session.send(st.stanza("close", { xmlns = xmlns_framing }));
 		function session.send() return false; end
 
+		-- luacheck: ignore 422/reason
+		-- FIXME reason should be handled in common place
 		local reason = (reason and (reason.name or reason.text or reason.condition)) or reason;
 		session.log("debug", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason or "session closed");