From 43351d2b54f7d8451a0e1ada7a72514c1ae1e396 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 7 Mar 2022 00:13:56 +0100 Subject: Spelling: Fix various spelling mistakes (thanks timeless) Words, sometimes I wonder how they even work Maybe I missed something. --- core/rostermanager.lua | 2 +- doc/coding_style.md | 2 +- net/dns.lua | 10 +++++----- net/server_event.lua | 6 +++--- plugins/adhoc/mod_adhoc.lua | 2 +- plugins/mod_http_files.lua | 4 ++-- spec/json/pass1.json | 6 +++--- spec/util_dataforms_spec.lua | 4 ++-- teal-src/util/encodings.d.tl | 2 +- tools/ejabberd2prosody.lua | 2 +- tools/migration/prosody-migrator.lua | 4 ++-- util-src/struct.c | 2 +- util/datamanager.lua | 4 ++-- util/openmetrics.lua | 2 +- util/pluginloader.lua | 2 +- util/prosodyctl/cert.lua | 2 +- util/sasl.lua | 4 ++-- util/statsd.lua | 2 +- 18 files changed, 31 insertions(+), 31 deletions(-) diff --git a/core/rostermanager.lua b/core/rostermanager.lua index 7b104339..efb80abb 100644 --- a/core/rostermanager.lua +++ b/core/rostermanager.lua @@ -139,7 +139,7 @@ local function load_roster(username, host) -- Due to map store use, we need to manually delete this entry log("debug", "Removing legacy 'pending' entry"); if not save_roster(username, host, roster, "pending") then - log("warn", "Could not remove legacy 'pendig' entry"); + log("warn", "Could not remove legacy 'pending' entry"); end end if roster[jid] then diff --git a/doc/coding_style.md b/doc/coding_style.md index 3d831e3f..8f151b90 100644 --- a/doc/coding_style.md +++ b/doc/coding_style.md @@ -20,7 +20,7 @@ end ``` Tab width is configurable in editors, so never assume a particular width. -Specically this means you should not mix tabs and spaces, or use tabs for +Specifically this means you should not mix tabs and spaces, or use tabs for alignment of items at different indentation levels. * Use LF (Unix) line endings. diff --git a/net/dns.lua b/net/dns.lua index 17119152..a9846e86 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -344,7 +344,7 @@ local function encodeHeader(o) -- - - - - - - - - - - - - - - encodeHeader -- 4 not implemented -- 5 refused -- 6-15 reserved - o.z = o.z or 0; -- 3b 0 resvered + o.z = o.z or 0; -- 3b 0 reserved o.ra = o.ra or 0; -- 1b 1 recursion available o.qdcount = o.qdcount or 1; -- 16b number of question RRs @@ -885,7 +885,7 @@ function resolver:query(qname, qtype, qclass) -- - - - - - - - - - -- query if co then set(self.wanted, qclass, qtype, qname, co, true); end - + if have_timer and self.timeout then local num_servers = #self.server; local i = 1; @@ -941,7 +941,7 @@ function resolver:servfail(sock, err) sock:send(o.packet); end end - end + end if not retried then log("debug", 'tried all servers, giving up'); self:cancel(o.qclass, o.qtype, o.qname); @@ -994,7 +994,7 @@ function resolver:receive(rset) -- - - - - - - - - - - - - - - - - receive -- retire the query local queries = self.active[response.header.id]; queries[response.question.raw] = nil; - + if not next(queries) then self.active[response.header.id] = nil; end if not next(self.active) then self:closeall(); end @@ -1008,7 +1008,7 @@ function resolver:receive(rset) -- - - - - - - - - - - - - - - - - receive set(self.wanted, q.class, q.type, q.name, nil); end end - + end end end diff --git a/net/server_event.lua b/net/server_event.lua index 139c7e5f..c30181b8 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -262,7 +262,7 @@ end --TODO: Deprecate function interface_mt:lock_read(switch) - log("warn", ":lock_read is deprecated, use :pasue() and :resume()"); + log("warn", ":lock_read is deprecated, use :pause() and :resume()"); if switch then return self:pause(); else @@ -540,7 +540,7 @@ local function handleclient( client, ip, port, server, pattern, listener, sslctx --vdebug( "tried to read in writecallback, result:", ret ) end if interface.eventwritetimeout then -- luasec only - interface.eventwritetimeout:close( ) -- first we have to close timeout event which where regged after a wantread error + interface.eventwritetimeout:close( ) -- first we have to close timeout event which where registered after a wantread error interface.eventwritetimeout = false end end @@ -607,7 +607,7 @@ local function handleclient( client, ip, port, server, pattern, listener, sslctx return -1 -- took too long to get some data from client -> disconnect end if interface._usingssl then -- handle luasec - if interface.eventwritetimeout then -- ok, in the past writecallback was regged + if interface.eventwritetimeout then -- ok, in the past writecallback was registered local ret = interface.writecallback( ) -- call it --vdebug( "tried to write in readcallback, result:", tostring(ret) ) end diff --git a/plugins/adhoc/mod_adhoc.lua b/plugins/adhoc/mod_adhoc.lua index 23846270..09a72075 100644 --- a/plugins/adhoc/mod_adhoc.lua +++ b/plugins/adhoc/mod_adhoc.lua @@ -91,7 +91,7 @@ end, 500); local function adhoc_added(event) local item = event.item; - -- Dang this was noicy + -- Dang this was noisy module:log("debug", "Command added by mod_%s: %q, %q", item._provided_by or "", item.name, item.node); commands[item.node] = item; end diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua index 4d0b14cd..69389b7f 100644 --- a/plugins/mod_http_files.lua +++ b/plugins/mod_http_files.lua @@ -75,12 +75,12 @@ function serve(opts) opts.index_files = dir_indices; end -- TODO Crank up to warning - module:log("debug", "%s should be updated to use 'net.http.files' insead of mod_http_files", get_calling_module()); + module:log("debug", "%s should be updated to use 'net.http.files' instead of mod_http_files", get_calling_module()); return fileserver.serve(opts); end function wrap_route(routes) - module:log("debug", "%s should be updated to use 'net.http.files' insead of mod_http_files", get_calling_module()); + module:log("debug", "%s should be updated to use 'net.http.files' instead of mod_http_files", get_calling_module()); for route,handler in pairs(routes) do if type(handler) ~= "function" then routes[route] = fileserver.serve(handler); diff --git a/spec/json/pass1.json b/spec/json/pass1.json index 70e26854..4d46cfcb 100644 --- a/spec/json/pass1.json +++ b/spec/json/pass1.json @@ -20,8 +20,8 @@ "backslash": "\\", "controls": "\b\f\n\r\t", "slash": "/ & \/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "alpha": "abcdefghijklmnopqrstuvwxyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "digit": "0123456789", "0123456789": "digit", "special": "`1~!@#$%^&*()_+-={':[,]}|;.?", @@ -55,4 +55,4 @@ 0.1e1, 1e-1, 1e00,2e+00,2e-00 -,"rosebud"] \ No newline at end of file +,"rosebud"] diff --git a/spec/util_dataforms_spec.lua b/spec/util_dataforms_spec.lua index e0a9bb9b..5293238a 100644 --- a/spec/util_dataforms_spec.lua +++ b/spec/util_dataforms_spec.lua @@ -452,14 +452,14 @@ describe("util.dataforms", function () assert.string(e.number); end); - it("bounds-cheking work works", function () + it("bounds-checking work works", function () local d,e = f:data(f:form({number = 100})); assert.not_equal(100, d.number); assert.table(e); assert.string(e.number); end); - it("serializes largeer ints okay", function () + it("serializes larger ints okay", function () local x = f:form{number=1125899906842624} assert.equal("1125899906842624", x:find("field/value#")) end); diff --git a/teal-src/util/encodings.d.tl b/teal-src/util/encodings.d.tl index f77039dd..58aefa5e 100644 --- a/teal-src/util/encodings.d.tl +++ b/teal-src/util/encodings.d.tl @@ -19,7 +19,7 @@ local record lib length : function (s : string) : integer end record confusable - skeleteon : function (s : string) : string + skeleton : function (s : string) : string end version : string end diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index e3caefd5..57bdc95b 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -187,7 +187,7 @@ function muc_room(node, host, properties) for _,aff in ipairs(properties.affiliations) do store._affiliations[build_jid(aff[1])] = aff[2][1] or aff[2]; end - -- destructre ejabberd's subject datum (e.g. [{text,<<>>,<<"my room subject">>}] ) + -- destructure ejabberd's subject datum (e.g. [{text,<<>>,<<"my room subject">>}] ) store._data.subject = properties.subject[1][3]; if properties.subject_author then store._data.subject_from = store.jid .. "/" .. properties.subject_author; diff --git a/tools/migration/prosody-migrator.lua b/tools/migration/prosody-migrator.lua index c51dde15..21eb32e7 100644 --- a/tools/migration/prosody-migrator.lua +++ b/tools/migration/prosody-migrator.lua @@ -38,7 +38,7 @@ local function usage() print("Usage: " .. arg[0] .. " [OPTIONS] FROM_STORE TO_STORE"); print(" --config FILE Specify config file") print(" --keep-going Keep going in case of errors"); - print(" -v, --verbose Incease log-level"); + print(" -v, --verbose Increase log-level"); print(""); print("If no stores are specified, 'input' and 'output' are used."); end @@ -153,7 +153,7 @@ local function users(store, host) log("debug", "Using store user iterator") return store:users(); else - log("debug", "Using usermanagre user iterator") + log("debug", "Using usermanager user iterator") return um.users(host); end end diff --git a/util-src/struct.c b/util-src/struct.c index 40fdffac..e80df4e6 100644 --- a/util-src/struct.c +++ b/util-src/struct.c @@ -10,7 +10,7 @@ ** > - big endian ** < - little endian ** ![num] - alignment -** x - pading +** x - padding ** b/B - signed/unsigned byte ** h/H - signed/unsigned short ** l/L - signed/unsigned long diff --git a/util/datamanager.lua b/util/datamanager.lua index b8829de1..352e509f 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -222,7 +222,7 @@ local function store(username, host, datastore, data) os_remove(getpath(username, host, datastore)); end -- we write data even when we are deleting because lua doesn't have a - -- platform independent way of checking for non-exisitng files + -- platform independent way of checking for non-existing files until ok; return true; end @@ -290,7 +290,7 @@ local function list_store(username, host, datastore, data) os_remove(getpath(username, host, datastore, "list")); end -- we write data even when we are deleting because lua doesn't have a - -- platform independent way of checking for non-exisitng files + -- platform independent way of checking for non-existing files return true; end diff --git a/util/openmetrics.lua b/util/openmetrics.lua index 2fb8b967..cb7791ec 100644 --- a/util/openmetrics.lua +++ b/util/openmetrics.lua @@ -10,7 +10,7 @@ The following metric types are supported: - Histogram - Summary -It is used by util.statsd and util.statistics to provite the OpenMetrics API. +It is used by util.statsd and util.statistics to provide the OpenMetrics API. To understand what this module is about, it is useful to familiarize oneself with the terms MetricFamily, Metric, LabelSet, Label and MetricPoint as diff --git a/util/pluginloader.lua b/util/pluginloader.lua index 77f893b4..f2ccb4cb 100644 --- a/util/pluginloader.lua +++ b/util/pluginloader.lua @@ -12,7 +12,7 @@ local lua_version = _VERSION:match(" (.+)$"); local plugin_dir = {}; for path in (CFG_PLUGINDIR or "./plugins/"):gsub("[/\\]", dir_sep):gmatch("[^"..path_sep.."]+") do path = path..dir_sep; -- add path separator to path end - path = path:gsub(dir_sep..dir_sep.."+", dir_sep); -- coalesce multiple separaters + path = path:gsub(dir_sep..dir_sep.."+", dir_sep); -- coalesce multiple separators plugin_dir[#plugin_dir + 1] = path; end diff --git a/util/prosodyctl/cert.lua b/util/prosodyctl/cert.lua index 59b6f982..02c81585 100644 --- a/util/prosodyctl/cert.lua +++ b/util/prosodyctl/cert.lua @@ -237,7 +237,7 @@ function cert_commands.import(arg) for _, host in ipairs(hostnames) do local paths = cm.find_cert_in_index(files_by_name, host); if paths and imported[paths.certificate] then - -- One certificate, many mames! + -- One certificate, many names! table.insert(imported, host); elseif paths then local c = copy(paths.certificate, cert_basedir .. "/" .. host .. ".crt", nil, owner, group); diff --git a/util/sasl.lua b/util/sasl.lua index 46e75e48..528743d1 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -47,7 +47,7 @@ local registered_mechanisms = {}; local backend_mechanism = {}; local mechanism_channelbindings = {}; --- register a new SASL mechanims +-- register a new SASL mechanisms local function registerMechanism(name, backends, f, cb_backends) assert(type(name) == "string", "Parameter name MUST be a string."); assert(type(backends) == "string" or type(backends) == "table", "Parameter backends MUST be either a string or a table."); @@ -97,7 +97,7 @@ function method:clean_clone() return new(self.realm, self.profile) end --- get a list of possible SASL mechanims to use +-- get a list of possible SASL mechanisms to use function method:mechanisms() local current_mechs = {}; for mech, _ in pairs(self.mechs) do diff --git a/util/statsd.lua b/util/statsd.lua index 6ae85c31..581f945a 100644 --- a/util/statsd.lua +++ b/util/statsd.lua @@ -85,7 +85,7 @@ local histogram_metric_mt = {} histogram_metric_mt.__index = histogram_metric_mt local function new_histogram_metric(buckets, full_name, impl) - -- NOTE: even though the more or less proprietrary dogstatsd has its own + -- NOTE: even though the more or less proprietary dogstatsd has Its own -- histogram implementation, we push the individual buckets in this statsd -- backend for both consistency and compatibility across statsd -- implementations. -- cgit v1.2.3