From fa9d2ec96308906179bf39bff1442662b1beff16 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Dec 2018 17:00:30 +0100 Subject: luacheckrc: Set Lua standard to 5.3 with 5.2 compat enabled --- .luacheckrc | 1 + 1 file changed, 1 insertion(+) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index ce3d377b..3192768c 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -2,6 +2,7 @@ cache = true codes = true ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log", "143/table", "113/unpack" } +std = "lua53c" max_line_length = 150 read_globals = { -- cgit v1.2.3 From 2d56ac0394838f6fe199566bd5a8f2be15c27a8e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Dec 2018 17:07:28 +0100 Subject: lint: No longer ignore access to the deprecated global 'unpack' _G.unpack is deprecated in Lua 5.2 --- .luacheckrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index 3192768c..96882c73 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,6 +1,6 @@ cache = true codes = true -ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log", "143/table", "113/unpack" } +ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log", "143/table", } std = "lua53c" max_line_length = 150 -- cgit v1.2.3 From 5e2c950296e59fc524cbe9a943d8b2b3b85ca22a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Dec 2018 17:13:39 +0100 Subject: luacheckrc: No longer ignore access to undefined fields on table lib --- .luacheckrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index 96882c73..3e3fb2b5 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,6 +1,6 @@ cache = true codes = true -ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log", "143/table", } +ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log", } std = "lua53c" max_line_length = 150 -- cgit v1.2.3 From 4da406588e5177c0b663f2658336888b29795d13 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 24 Dec 2018 03:00:27 +0100 Subject: net.adns: Silence individual luacheck warnings instead of ignoring entire file --- .luacheckrc | 1 - 1 file changed, 1 deletion(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index 3e3fb2b5..5035f446 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -132,7 +132,6 @@ if os.getenv("PROSODY_STRICT_LINT") ~= "1" then "fallbacks/bit.lua"; "fallbacks/lxp.lua"; - "net/adns.lua"; "net/cqueues.lua"; "net/dns.lua"; "net/server_select.lua"; -- cgit v1.2.3 From 92445d93df5e5f7d6933c706dd8e60f4e54e0d7c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 30 Dec 2018 03:20:37 +0100 Subject: luacheckrc: Teach luacheck about the new module:send_iq() API --- .luacheckrc | 1 + 1 file changed, 1 insertion(+) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index 5035f446..b2fa7cdb 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -80,6 +80,7 @@ files["plugins/"] = { "module.remove_item", "module.require", "module.send", + "module.send_iq", "module.set_global", "module.shared", "module.unhook", -- cgit v1.2.3 From d89b760be1cc44c166a587b8b32b67536c92c9d9 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 19 Mar 2019 09:07:36 +0000 Subject: .luacheckrc: Update to reflect new module API methods --- .luacheckrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index b2fa7cdb..f0cb93a8 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -34,7 +34,6 @@ files["plugins/"] = { "module.name", "module.host", "module._log", - "module.log", "module.event_handlers", "module.reloading", "module.saved_state", @@ -65,12 +64,15 @@ files["plugins/"] = { "module.get_option_scalar", "module.get_option_set", "module.get_option_string", + "module.get_status", "module.handle_items", "module.hook", "module.hook_global", "module.hook_object_event", "module.hook_tag", "module.load_resource", + "module.log", + "module.log_status", "module.measure", "module.measure_event", "module.measure_global_event", @@ -82,6 +84,7 @@ files["plugins/"] = { "module.send", "module.send_iq", "module.set_global", + "module.set_status", "module.shared", "module.unhook", "module.unhook_object_event", -- cgit v1.2.3 From ce1056dc43fb98b6df1b025e621c28cf4cabf7b9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 1 Apr 2019 21:15:47 +0200 Subject: .luacheckrc: Correct indentation of 'exclude_files' list --- .luacheckrc | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index f0cb93a8..f6760ee3 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -131,42 +131,42 @@ if os.getenv("PROSODY_STRICT_LINT") ~= "1" then unused_secondaries = false local exclude_files = { - "doc/net.server.lua"; + "doc/net.server.lua"; - "fallbacks/bit.lua"; - "fallbacks/lxp.lua"; + "fallbacks/bit.lua"; + "fallbacks/lxp.lua"; - "net/cqueues.lua"; - "net/dns.lua"; - "net/server_select.lua"; + "net/cqueues.lua"; + "net/dns.lua"; + "net/server_select.lua"; - "plugins/mod_storage_sql1.lua"; + "plugins/mod_storage_sql1.lua"; - "spec/core_configmanager_spec.lua"; - "spec/core_moduleapi_spec.lua"; - "spec/net_http_parser_spec.lua"; - "spec/util_events_spec.lua"; - "spec/util_http_spec.lua"; - "spec/util_ip_spec.lua"; - "spec/util_multitable_spec.lua"; - "spec/util_rfc6724_spec.lua"; - "spec/util_throttle_spec.lua"; - "spec/util_xmppstream_spec.lua"; + "spec/core_configmanager_spec.lua"; + "spec/core_moduleapi_spec.lua"; + "spec/net_http_parser_spec.lua"; + "spec/util_events_spec.lua"; + "spec/util_http_spec.lua"; + "spec/util_ip_spec.lua"; + "spec/util_multitable_spec.lua"; + "spec/util_rfc6724_spec.lua"; + "spec/util_throttle_spec.lua"; + "spec/util_xmppstream_spec.lua"; - "tools/ejabberd2prosody.lua"; - "tools/ejabberdsql2prosody.lua"; - "tools/erlparse.lua"; - "tools/jabberd14sql2prosody.lua"; - "tools/migration/migrator.cfg.lua"; - "tools/migration/migrator/jabberd14.lua"; - "tools/migration/migrator/mtools.lua"; - "tools/migration/migrator/prosody_files.lua"; - "tools/migration/migrator/prosody_sql.lua"; - "tools/migration/prosody-migrator.lua"; - "tools/openfire2prosody.lua"; - "tools/xep227toprosody.lua"; + "tools/ejabberd2prosody.lua"; + "tools/ejabberdsql2prosody.lua"; + "tools/erlparse.lua"; + "tools/jabberd14sql2prosody.lua"; + "tools/migration/migrator.cfg.lua"; + "tools/migration/migrator/jabberd14.lua"; + "tools/migration/migrator/mtools.lua"; + "tools/migration/migrator/prosody_files.lua"; + "tools/migration/migrator/prosody_sql.lua"; + "tools/migration/prosody-migrator.lua"; + "tools/openfire2prosody.lua"; + "tools/xep227toprosody.lua"; - "util/sasl/digest-md5.lua"; + "util/sasl/digest-md5.lua"; } for _, file in ipairs(exclude_files) do files[file] = { only = {} } -- cgit v1.2.3 From 6866201d71f4419d6e0bc0169aa6c9f79e3c4695 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 9 Dec 2019 12:42:22 +0000 Subject: .luacheckrc: Remove passing file from ignore list --- .luacheckrc | 1 - 1 file changed, 1 deletion(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index f6760ee3..2f3cc1dc 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -142,7 +142,6 @@ if os.getenv("PROSODY_STRICT_LINT") ~= "1" then "plugins/mod_storage_sql1.lua"; - "spec/core_configmanager_spec.lua"; "spec/core_moduleapi_spec.lua"; "spec/net_http_parser_spec.lua"; "spec/util_events_spec.lua"; -- cgit v1.2.3 From fbb0bbe1b4a9bda0dcfd247fb9412124396c332f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 9 Dec 2019 12:44:43 +0000 Subject: .luacheckrc: Remove passing spec/ files from ignore list --- .luacheckrc | 3 --- 1 file changed, 3 deletions(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index 2f3cc1dc..1a2516ca 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -143,14 +143,11 @@ if os.getenv("PROSODY_STRICT_LINT") ~= "1" then "plugins/mod_storage_sql1.lua"; "spec/core_moduleapi_spec.lua"; - "spec/net_http_parser_spec.lua"; - "spec/util_events_spec.lua"; "spec/util_http_spec.lua"; "spec/util_ip_spec.lua"; "spec/util_multitable_spec.lua"; "spec/util_rfc6724_spec.lua"; "spec/util_throttle_spec.lua"; - "spec/util_xmppstream_spec.lua"; "tools/ejabberd2prosody.lua"; "tools/ejabberdsql2prosody.lua"; -- cgit v1.2.3 From b3259cf52e03c1b81c823de04a3471ba60f080c6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 20 Dec 2019 22:23:22 +0100 Subject: luacheck: Don't not warn about not using secondary return values Brace for ONE BILLION WARNINGS!!! --- .luacheckrc | 1 - 1 file changed, 1 deletion(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index 1a2516ca..6e8481de 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -128,7 +128,6 @@ files["prosody.cfg.lua"] = { if os.getenv("PROSODY_STRICT_LINT") ~= "1" then -- These files have not yet been brought up to standard -- Do not add more files here, but do help us fix these! - unused_secondaries = false local exclude_files = { "doc/net.server.lua"; -- cgit v1.2.3 From 44ed7a0e21e7c4a3380cb97be671f12a4b40f8d5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 14 Apr 2020 16:51:24 +0200 Subject: util.sasl.digest-md5: Remove, obsolete since 2011 RFC 6331 lists several problems with this outdated authentication mechanism. The code here was also completely ignored by lint checks and has probably not been used for a long time, as it is incompatible with SCRAM-hashed password storage. --- .luacheckrc | 2 -- 1 file changed, 2 deletions(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index 6e8481de..bb4568e6 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -160,8 +160,6 @@ if os.getenv("PROSODY_STRICT_LINT") ~= "1" then "tools/migration/prosody-migrator.lua"; "tools/openfire2prosody.lua"; "tools/xep227toprosody.lua"; - - "util/sasl/digest-md5.lua"; } for _, file in ipairs(exclude_files) do files[file] = { only = {} } -- cgit v1.2.3 From 6a30c93ed3ca83c7505a1c7f026e692149a03240 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 8 Jul 2020 20:22:48 +0200 Subject: luacheck: Remove exception for net.cqueues since it is now clean --- .luacheckrc | 1 - 1 file changed, 1 deletion(-) (limited to '.luacheckrc') diff --git a/.luacheckrc b/.luacheckrc index bb4568e6..cbfcef8d 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -135,7 +135,6 @@ if os.getenv("PROSODY_STRICT_LINT") ~= "1" then "fallbacks/bit.lua"; "fallbacks/lxp.lua"; - "net/cqueues.lua"; "net/dns.lua"; "net/server_select.lua"; -- cgit v1.2.3