commit 2b8e695: Spelling (#4086)

GitHub noreply at github.com
Tue Feb 22 22:07:04 UTC 2022


Author: Josh Soref
Date: 2022-02-22 17:01:28 -0500
URL: https://github.com/rspamd/rspamd/commit/2b8e6958f40ef36c1508118ac36a43694283a83c (HEAD -> master)

Spelling (#4086)
[Rework] Massive spelling fix from @jsoref
---
 CMakeLists.txt                              |  2 +-
 conf/groups.conf                            |  2 +-
 doc/doxydown/doxydown.pl                    | 10 ++---
 interface/README.md                         |  2 +-
 interface/index.html                        |  2 +-
 lua_style.md                                |  2 +-
 lualib/lua_cfg_transform.lua                |  2 +-
 lualib/lua_content/pdf.lua                  | 16 ++++----
 lualib/lua_fuzzy.lua                        |  2 +-
 lualib/lua_meta.lua                         |  4 +-
 lualib/lua_redis.lua                        |  4 +-
 lualib/lua_scanners/common.lua              |  2 +-
 lualib/lua_scanners/fprot.lua               |  2 +-
 lualib/lua_scanners/sophos.lua              |  2 +-
 lualib/lua_scanners/virustotal.lua          |  2 +-
 lualib/lua_selectors/init.lua               |  2 +-
 lualib/lua_stat.lua                         |  2 +-
 lualib/lua_util.lua                         |  8 ++--
 lualib/lua_verdict.lua                      |  2 +-
 lualib/plugins/dmarc.lua                    |  6 +--
 lualib/plugins/neural.lua                   |  6 +--
 lualib/rspamadm/clickhouse.lua              |  2 +-
 lualib/rspamadm/configgraph.lua             | 10 ++---
 lualib/rspamadm/configwizard.lua            |  2 +-
 lualib/rspamadm/mime.lua                    | 16 ++++----
 rules/bounce.lua                            |  4 +-
 rules/headers_checks.lua                    |  2 +-
 rules/regexp/headers.lua                    |  8 ++--
 src/controller.c                            |  6 +--
 src/fuzzy_storage.c                         |  2 +-
 src/libcryptobox/catena/catena.c            |  2 +-
 src/libmime/lang_detection.c                | 64 ++++++++++++++---------------
 src/libmime/mime_parser.c                   |  4 +-
 src/libmime/received.cxx                    |  2 +-
 src/libmime/scan_result.c                   |  2 +-
 src/libserver/cfg_file.h                    |  2 +-
 src/libserver/cfg_utils.c                   | 22 +++++-----
 src/libserver/css/css_rule.hxx              |  2 +-
 src/libserver/dkim.h                        |  2 +-
 src/libserver/fuzzy_backend/fuzzy_backend.c |  2 +-
 src/libserver/html/html.cxx                 | 10 ++---
 src/libserver/html/html_url.cxx             |  2 +-
 src/libserver/http/http_connection.c        |  2 +-
 src/libserver/http/http_context.c           |  2 +-
 src/libserver/logger/logger.c               |  8 ++--
 src/libserver/maps/map.c                    |  2 +-
 src/libserver/maps/map_helpers.c            |  2 +-
 src/libserver/re_cache.c                    |  4 +-
 src/libserver/rspamd_symcache.c             |  4 +-
 src/libserver/rspamd_symcache.h             |  4 +-
 src/libserver/spf.c                         | 10 ++---
 src/libserver/task.h                        |  2 +-
 src/libserver/url.c                         |  2 +-
 src/libserver/url.h                         |  2 +-
 src/libserver/worker_util.c                 |  2 +-
 src/libserver/worker_util.h                 |  2 +-
 src/libstat/learn_cache/redis_cache.c       |  6 +--
 src/libstat/learn_cache/sqlite3_cache.c     |  6 +--
 src/libstat/stat_internal.h                 |  2 +-
 src/libstat/stat_process.c                  |  8 ++--
 src/libutil/addr.h                          |  2 +-
 src/libutil/hash.h                          |  4 +-
 src/libutil/mem_pool.c                      |  2 +-
 src/libutil/mem_pool.h                      |  2 +-
 src/libutil/rrd.h                           |  6 +--
 src/libutil/shingles.h                      |  4 +-
 src/libutil/str_util.c                      |  2 +-
 src/libutil/upstream.c                      |  2 +-
 src/libutil/upstream.h                      |  2 +-
 src/libutil/util.c                          |  4 +-
 src/libutil/util.h                          |  2 +-
 src/lua/lua_config.c                        | 18 ++++----
 src/lua/lua_dns_resolver.c                  | 10 ++---
 src/lua/lua_mimepart.c                      |  6 +--
 src/lua/lua_redis.c                         |  2 +-
 src/lua/lua_regexp.c                        |  2 +-
 src/lua/lua_task.c                          | 18 ++++----
 src/lua/lua_tcp.c                           |  2 +-
 src/lua/lua_text.c                          |  4 +-
 src/lua/lua_thread_pool.h                   |  2 +-
 src/lua/lua_url.c                           |  6 +--
 src/lua/lua_util.c                          | 10 ++---
 src/lua/lua_xmlrpc.c                        |  8 ++--
 src/plugins/chartable.c                     |  2 +-
 src/plugins/fuzzy_check.c                   |  6 +--
 src/plugins/lua/bayes_expiry.lua            | 22 +++++-----
 src/plugins/lua/bimi.lua                    |  2 +-
 src/plugins/lua/clickhouse.lua              |  2 +-
 src/plugins/lua/maillist.lua                |  2 +-
 src/plugins/lua/multimap.lua                |  2 +-
 src/plugins/lua/rbl.lua                     |  8 ++--
 src/plugins/lua/whitelist.lua               |  2 +-
 src/rspamd.c                                | 12 +++---
 src/rspamd.h                                |  4 +-
 test/coverage.md                            |  4 +-
 test/rspamd_cryptobox_test.c                | 10 ++---
 test/rspamd_mem_pool_test.c                 |  4 +-
 test/rspamd_test_suite.c                    |  2 +-
 test/tools/dump_coveralls.py                |  2 +-
 test/tools/gcov_coveralls.py                | 14 +++----
 test/tools/http_put.py                      |  2 +-
 test/tools/merge_coveralls.py               |  2 +-
 utils/asn.pl                                |  2 +-
 utils/redirector.pl.in                      |  2 +-
 104 files changed, 274 insertions(+), 274 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ceb34c28..096c2e79e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,7 @@ OPTION(ENABLE_LIBUNWIND    "Use libunwind to print crash traces [default: OFF]"
 OPTION(ENABLE_LUA_TRACE    "Trace all Lua C API invocations [default: OFF]" OFF)
 OPTION(ENABLE_LUA_REPL     "Enables Lua repl (requires C++11 compiler) [default: ON]" ON)
 OPTION(SYSTEM_ZSTD         "Use system zstd instead of bundled one [default: OFF]" OFF)
-OPTION(SYSTEM_FMT          "Use system fmt instead of bundled one [defalut: OFF]" OFF)
+OPTION(SYSTEM_FMT          "Use system fmt instead of bundled one [default: OFF]" OFF)
 OPTION(SYSTEM_DOCTEST      "Use system doctest instead of bundled one [default: OFF]" OFF)
 
 ############################# INCLUDE SECTION #############################################
diff --git a/conf/groups.conf b/conf/groups.conf
index dcea1bcd0..2aeb4ed5d 100644
--- a/conf/groups.conf
+++ b/conf/groups.conf
@@ -88,7 +88,7 @@ group "mime_types" {
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/mime_types_group.conf"
 }
 
-# Used to limit maximium score
+# Used to limit maximum score
 group "excessqp" {
     max_score = 2.4;
     .include(try=true; priority=1; duplicate=merge) "$LOCAL_CONFDIR/local.d/excessqp_group.conf"
diff --git a/doc/doxydown/doxydown.pl b/doc/doxydown/doxydown.pl
index 9b4c36814..9c2f74131 100755
--- a/doc/doxydown/doxydown.pl
+++ b/doc/doxydown/doxydown.pl
@@ -271,12 +271,12 @@ sub print_markdown {
             }
         }
 
-        if ($m->{'stucts'}) {
-            if ( scalar(@{ $m->{'stucts'} }) > 0 ) {
-                print "\n## Stucts\n\nThe module `$mname` defines the following stucts.\n\n";
+        if ($m->{'structs'}) {
+            if ( scalar(@{ $m->{'structs'} }) > 0 ) {
+                print "\n## Structs\n\nThe module `$mname` defines the following structs.\n\n";
 
-                foreach ( @{ $m->{'stucts'} } ) {
-                    print_stuct_markdown( "Stuct", $_->{'name'}, $_ );
+                foreach ( @{ $m->{'structs'} } ) {
+                    print_struct_markdown( "Struct", $_->{'name'}, $_ );
 
                     print "\nBack to [module description](#$m->{'id'}).\n\n";
 
diff --git a/interface/README.md b/interface/README.md
index 210f1b281..a56aa66b9 100644
--- a/interface/README.md
+++ b/interface/README.md
@@ -31,7 +31,7 @@ worker {
         count = 1;
         # Password for normal commands (use rspamadm pw)
         password = "$2$anydoddx67ggcs74owybhcwqsq3z67q4$udympbo8pfcfqkeiiuj7gegabk5jpt8edmhseujhar9ooyuzig5b";
-        # Password for privilleged commands (use rspamadm pw)
+        # Password for privileged commands (use rspamadm pw)
         enable_password = "$2$nx6sqkxtewx9c5s3hxjmabaxdcr46pk9$45qajkbyqx77abapiqugpjpsojj38zcqn7xnp3ekqyu674koux4b";
         # Path to webiu static files
         static_dir = "${WWWDIR}";
diff --git a/interface/index.html b/interface/index.html
index d53a85e2d..b0727e136 100644
--- a/interface/index.html
+++ b/interface/index.html
@@ -407,7 +407,7 @@
 						<div class="row">
 							<div class="col-lg-6">
 								<div class="card bg-light shadow card-body card p-2">
-									<p>Learn Bayessian classifier:</p>
+									<p>Learn Bayesian classifier:</p>
 									<form class="form-inline">
 										<div class="form-group">
 											<div class="btn-group">
diff --git a/lua_style.md b/lua_style.md
index aec6059dc..8ea7a81cf 100644
--- a/lua_style.md
+++ b/lua_style.md
@@ -174,7 +174,7 @@ This guide is forked from https://github.com/Olivine-Labs/lua-style-guide
     end
     ```
 
-  - Never name a parameter `arg`, this will take precendence over the `arg` object that is given to every function scope in older versions of Lua.
+  - Never name a parameter `arg`, this will take precedence over the `arg` object that is given to every function scope in older versions of Lua.
 
     ```lua
     -- bad
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua
index 050686df2..295c952db 100644
--- a/lualib/lua_cfg_transform.lua
+++ b/lualib/lua_cfg_transform.lua
@@ -396,7 +396,7 @@ return function(cfg)
 
     local actions_set = lua_util.list_to_hash(actions_defs)
 
-    -- Now check actions section for garbadge
+    -- Now check actions section for garbage
     actions_set['unknown_weight'] = true
     actions_set['grow_factor'] = true
     actions_set['subject'] = true
diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua
index 45c11d3b4..d73c7b1ae 100644
--- a/lualib/lua_content/pdf.lua
+++ b/lualib/lua_content/pdf.lua
@@ -558,7 +558,7 @@ local function process_action(task, pdf, obj)
         local extracted_js = maybe_extract_object_stream(js, pdf, task)
 
         if not extracted_js then
-          lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s',
+          lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s',
               obj.major, obj.minor, js)
         else
           js = extracted_js
@@ -571,7 +571,7 @@ local function process_action(task, pdf, obj)
         lua_util.debugm(N, task, 'extracted javascript from %s:%s: %s',
             obj.major, obj.minor, obj.js.data)
       else
-        lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s',
+        lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s',
             obj.major, obj.minor, js)
       end
     elseif obj.dict.F then
@@ -654,7 +654,7 @@ process_dict = function(task, pdf, obj, dict)
 
       if obj.dict.S and obj.dict.JS then
         obj.type = 'Javascript'
-        lua_util.debugm(N, task, 'implicit type for Javascript object %s:%s',
+        lua_util.debugm(N, task, 'implicit type for JavaScript object %s:%s',
             obj.major, obj.minor)
       else
         lua_util.debugm(N, task, 'no type for %s:%s',
@@ -757,7 +757,7 @@ process_dict = function(task, pdf, obj, dict)
           local extracted_js = maybe_extract_object_stream(js, pdf, task)
 
           if not extracted_js then
-            lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s',
+            lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s',
                 obj.major, obj.minor, js)
           else
             js = extracted_js
@@ -770,7 +770,7 @@ process_dict = function(task, pdf, obj, dict)
           lua_util.debugm(N, task, 'extracted javascript from %s:%s: %s',
               obj.major, obj.minor, obj.js.data)
         else
-          lua_util.debugm(N, task, 'invalid type for javascript from %s:%s: %s',
+          lua_util.debugm(N, task, 'invalid type for JavaScript from %s:%s: %s',
               obj.major, obj.minor, js)
         end
       end
@@ -1248,7 +1248,7 @@ local function process_pdf(input, mpart, task)
                   pdf_object.openaction.object.major, pdf_object.openaction.object.minor)
               table.insert(pdf_output.fuzzy_hashes, pdf_object.openaction.bin_hash)
             else
-              lua_util.debugm(N, task, "pdf: skip fuzzy hash from Javascript: %s, too short: %s",
+              lua_util.debugm(N, task, "pdf: skip fuzzy hash from JavaScript: %s, too short: %s",
                   pdf_object.openaction.hash, #pdf_object.openaction.data)
             end
           end
@@ -1256,13 +1256,13 @@ local function process_pdf(input, mpart, task)
           -- All hashes
           for h,sc in pairs(pdf_object.scripts) do
             if config.min_js_fuzzy and #sc.data >= config.min_js_fuzzy then
-              lua_util.debugm(N, task, "pdf: add fuzzy hash from Javascript: %s; size = %s; object: %s:%s",
+              lua_util.debugm(N, task, "pdf: add fuzzy hash from JavaScript: %s; size = %s; object: %s:%s",
                   sc.hash,
                   #sc.data,
                   sc.object.major, sc.object.minor)
               table.insert(pdf_output.fuzzy_hashes, h)
             else
-              lua_util.debugm(N, task, "pdf: skip fuzzy hash from Javascript: %s, too short: %s",
+              lua_util.debugm(N, task, "pdf: skip fuzzy hash from JavaScript: %s, too short: %s",
                   sc.hash, #sc.data)
             end
           end
diff --git a/lualib/lua_fuzzy.lua b/lualib/lua_fuzzy.lua
index 45227330f..eaeea7158 100644
--- a/lualib/lua_fuzzy.lua
+++ b/lualib/lua_fuzzy.lua
@@ -246,7 +246,7 @@ local function mime_types_check(task, part, rule)
   local id = part:get_id()
   lua_util.debugm(N, task, 'check binary part %s: %s', id, ct)
 
-  -- For bad mime mime parts we implicitly enable fuzzy check
+  -- For bad mime parts we implicitly enable fuzzy check
   local mime_trace = (task:get_symbol('MIME_TRACE') or {})[1]
   local opts = {}
 
diff --git a/lualib/lua_meta.lua b/lualib/lua_meta.lua
index 4f4a6e3ac..94ce73053 100644
--- a/lualib/lua_meta.lua
+++ b/lualib/lua_meta.lua
@@ -239,7 +239,7 @@ local function meta_words_function(task)
     0, -- ascii characters rate
     0, -- non-ascii characters rate
     0, -- capital characters rate
-    0, -- numeric cahracters
+    0, -- numeric characters
   }
   for _,p in ipairs(tp) do
     local stats = p:get_stats()
@@ -385,7 +385,7 @@ local metafunctions = {
       'ascii_characters_rate',
       'non_ascii_characters_rate',
       'capital_characters_rate',
-      'numeric_cahracters'
+      'numeric_characters'
     },
     description = [[Functions for words data matching:
     - average length of the words
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index 5bd6ede30..7737afa2b 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -79,7 +79,7 @@ local function redis_query_sentinel(ev_base, params, initialised)
       for _,m in ipairs(result) do
         local master = flatten_redis_table(m)
 
-        -- Wrap IPv6-adresses in brackets
+        -- Wrap IPv6-addresses in brackets
         if (master.ip:match(":")) then
           master.ip = "["..master.ip.."]"
         end
@@ -110,7 +110,7 @@ local function redis_query_sentinel(ev_base, params, initialised)
               lutil.debugm(N, rspamd_config,
                   'found slave for master %s with ip %s and port %s',
                   v.name, slave.ip, slave.port)
-              -- Wrap IPv6-adresses in brackets
+              -- Wrap IPv6-addresses in brackets
               if (slave.ip:match(":")) then
                 slave.ip = "["..slave.ip.."]"
               end
diff --git a/lualib/lua_scanners/common.lua b/lualib/lua_scanners/common.lua
index d052f4552..cefec8780 100644
--- a/lualib/lua_scanners/common.lua
+++ b/lualib/lua_scanners/common.lua
@@ -405,7 +405,7 @@ local function check_parts_match(task, rule)
           lua_util.debugm(rule.name, task, '%s: extension matched: |%s|%s|', rule.log_prefix, ext, ext2)
           return true
         elseif match_filter(task, rule, fname, rule.mime_parts_filter_regex, 'regex') then
-          lua_util.debugm(rule.name, task, '%s: filname regex matched', rule.log_prefix)
+          lua_util.debugm(rule.name, task, '%s: filename regex matched', rule.log_prefix)
           return true
         end
       end
diff --git a/lualib/lua_scanners/fprot.lua b/lualib/lua_scanners/fprot.lua
index 4c416524c..0d63bf4b8 100644
--- a/lualib/lua_scanners/fprot.lua
+++ b/lualib/lua_scanners/fprot.lua
@@ -135,7 +135,7 @@ local function fprot_check(task, content, digest, rule, maybe_part)
                 rule['symbol'], rule['type'])
           end
         else
-          -- returncodes: 1: infected, 2: suspicious, 3: both, 4-255: some error occured
+          -- returncodes: 1: infected, 2: suspicious, 3: both, 4-255: some error occurred
           -- see http://www.f-prot.com/support/helpfiles/unix/appendix_c.html for more detail
           local vname = string.match(data, '^[1-3] <[%w%s]-: (.-)>')
           if not vname then
diff --git a/lualib/lua_scanners/sophos.lua b/lualib/lua_scanners/sophos.lua
index 36ebe4177..cfbe93ff2 100644
--- a/lualib/lua_scanners/sophos.lua
+++ b/lualib/lua_scanners/sophos.lua
@@ -149,7 +149,7 @@ local function sophos_check(task, content, digest, rule, maybe_part)
             rspamd_logger.warnx(task, 'Message is oversized (REJ 4): %s', data)
             common.yield_result(task, rule, 'SAVDI: Message oversized (REJ 4)',
                 0.0, 'fail', maybe_part)
-            -- excplicitly set REJ1 message when SAVDIreports a protocol error
+            -- explicitly set REJ1 message when SAVDIreports a protocol error
           elseif string.find(data, 'REJ 1') then
             rspamd_logger.errx(task, 'SAVDI (Protocol error (REJ 1)): %s', data)
             common.yield_result(task, rule, 'SAVDI: Protocol error (REJ 1)',
diff --git a/lualib/lua_scanners/virustotal.lua b/lualib/lua_scanners/virustotal.lua
index 8c5d71dbb..030f053e1 100644
--- a/lualib/lua_scanners/virustotal.lua
+++ b/lualib/lua_scanners/virustotal.lua
@@ -16,7 +16,7 @@ limitations under the License.
 
 --[[[
 -- @module virustotal
--- This module contains Virustotal integaration support
+-- This module contains Virustotal integration support
 -- https://www.virustotal.com/
 --]]
 
diff --git a/lualib/lua_selectors/init.lua b/lualib/lua_selectors/init.lua
index eabf14b27..ef9a9d7e9 100644
--- a/lualib/lua_selectors/init.lua
+++ b/lualib/lua_selectors/init.lua
@@ -481,7 +481,7 @@ exports.combine_selectors = function(_, selectors, delimiter)
       return rspamd_text.fromtable(selectors, delimiter)
     end
   else
-    -- We need to do a spill on each table selector and make a cortezian product
+    -- We need to do a spill on each table selector and make a cortesian product
     -- e.g. s:tbl:s -> s:telt1:s + s:telt2:s ...
     local tbl = {}
     local res = {}
diff --git a/lualib/lua_stat.lua b/lualib/lua_stat.lua
index 39eb21b0e..7fff6cefe 100644
--- a/lualib/lua_stat.lua
+++ b/lualib/lua_stat.lua
@@ -396,7 +396,7 @@ exports.convert_sqlite_to_redis = convert_sqlite_to_redis
 --  symbol_ham = YYY
 --  db_spam = XXX.sqlite
 --  db_ham = YYY.sqlite
---  learn_cahe = ZZZ.sqlite
+--  learn_cache = ZZZ.sqlite
 --  per_user = true/false
 --  label = str
 --  }
diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua
index 4b0e50192..308663399 100644
--- a/lualib/lua_util.lua
+++ b/lualib/lua_util.lua
@@ -74,10 +74,10 @@ local function rspamd_str_split(s, sep)
 end
 
 --[[[
--- @function lua_util.str_split(text, deliminator)
--- Splits text into a numeric table by deliminator
--- @param {string} text deliminated text
--- @param {string} deliminator the deliminator
+-- @function lua_util.str_split(text, delimiter)
+-- Splits text into a numeric table by delimiter
+-- @param {string} text delimited text
+-- @param {string} delimiter the delimiter
 -- @return {table} numeric table containing string parts
 --]]
 
diff --git a/lualib/lua_verdict.lua b/lualib/lua_verdict.lua
index d6a1634a7..cde33f52e 100644
--- a/lualib/lua_verdict.lua
+++ b/lualib/lua_verdict.lua
@@ -77,7 +77,7 @@ local default_possible_verdicts = {
   },
   uncertain = {
     can_learn = false,
-    description = 'not certainity in verdict'
+    description = 'not certainty in verdict'
   }
 }
 
diff --git a/lualib/plugins/dmarc.lua b/lualib/plugins/dmarc.lua
index c72b68824..ef108a937 100644
--- a/lualib/plugins/dmarc.lua
+++ b/lualib/plugins/dmarc.lua
@@ -152,7 +152,7 @@ exports.gen_munging_callback = function(munging_opts, settings)
     if munging_opts.munge_map_condition then
       local accepted,trace = munging_opts.munge_map_condition:process(task)
       if not accepted then
-        lua_util.debugm(task, 'skip munging, maps condition not satisified: (%s)',
+        lua_util.debugm(task, 'skip munging, maps condition not satisfied: (%s)',
             trace)
         -- Excepted
         return
@@ -274,7 +274,7 @@ end
 -- Used to check dmarc record, check elements and produce dmarc policy processed
 -- result.
 -- Returns:
---     false,false - record is garbadge
+--     false,false - record is garbage
 --     false,error_message - record is invalid
 --     true,policy_table - record is valid and parsed
 ]]
@@ -349,7 +349,7 @@ local function dmarc_check_record(log_obj, record, is_tld)
     end
     result.raw_elts = elts
   else
-    return false,false -- Ignore garbadge
+    return false,false -- Ignore garbage
   end
 
   return true, result
diff --git a/lualib/plugins/neural.lua b/lualib/plugins/neural.lua
index 3ce91b5e2..ba8550a42 100644
--- a/lualib/plugins/neural.lua
+++ b/lualib/plugins/neural.lua
@@ -456,7 +456,7 @@ local function can_push_train_vector(rule, task, learn_type, nspam, nham)
       if nspam <= train_opts.max_trains then
         if train_opts.spam_skip_prob then
           if coin <= train_opts.spam_skip_prob then
-            rspamd_logger.infox(task, 'skip %s sample probabilisticaly; probability %s (%s skip chance)', learn_type,
+            rspamd_logger.infox(task, 'skip %s sample probabilistically; probability %s (%s skip chance)', learn_type,
                 coin, train_opts.spam_skip_prob)
             return false
           end
@@ -471,7 +471,7 @@ local function can_push_train_vector(rule, task, learn_type, nspam, nham)
       if nham <= train_opts.max_trains then
         if train_opts.ham_skip_prob then
           if coin <= train_opts.ham_skip_prob then
-            rspamd_logger.infox(task, 'skip %s sample probabilisticaly; probability %s (%s skip chance)', learn_type,
+            rspamd_logger.infox(task, 'skip %s sample probabilistically; probability %s (%s skip chance)', learn_type,
                 coin, train_opts.ham_skip_prob)
             return false
           end
@@ -533,7 +533,7 @@ local function spawn_train(params)
   else
     local inputs, outputs = {}, {}
 
-    -- Used to show sparsed vectors in a convenient format (for debugging only)
+    -- Used to show parsed vectors in a convenient format (for debugging only)
     local function debug_vec(t)
       local ret = {}
       for i,v in ipairs(t) do
diff --git a/lualib/rspamadm/clickhouse.lua b/lualib/rspamadm/clickhouse.lua
index 7f215f6aa..63e025f3e 100644
--- a/lualib/rspamadm/clickhouse.lua
+++ b/lualib/rspamadm/clickhouse.lua
@@ -165,7 +165,7 @@ local function days_list(days)
 end
 
 local function get_excluded_symbols(known_symbols, correlations, seen_total)
-  -- Walk results once to collect all symbols & count ocurrences
+  -- Walk results once to collect all symbols & count occurrences
 
   local remove = {}
   local known_symbols_list = {}
diff --git a/lualib/rspamadm/configgraph.lua b/lualib/rspamadm/configgraph.lua
index 9afc76cd6..6eef1f42f 100644
--- a/lualib/rspamadm/configgraph.lua
+++ b/lualib/rspamadm/configgraph.lua
@@ -38,7 +38,7 @@ local function process_filename(fname)
   return fname
 end
 
-local function output_dot(opts, nodes, adjastency)
+local function output_dot(opts, nodes, adjacency)
   rspamd_logger.messagex("digraph rspamd {")
   for k,node in pairs(nodes) do
     local attrs = {"shape=box"}
@@ -62,7 +62,7 @@ local function output_dot(opts, nodes, adjastency)
           table.concat(attrs, ','))
     end
   end
-  for _,adj in ipairs(adjastency) do
+  for _,adj in ipairs(adjacency) do
     local attrs = {}
     local skip = false
 
@@ -91,7 +91,7 @@ end
 
 local function load_config_traced(opts)
   local glob_traces = {}
-  local adjastency = {}
+  local adjacency = {}
   local nodes = {}
 
   local function maybe_match_glob(file)
@@ -105,7 +105,7 @@ local function load_config_traced(opts)
   end
 
   local function add_dep(from, node, args)
-    adjastency[#adjastency + 1] = {
+    adjacency[#adjacency + 1] = {
       from = from,
       to = node,
       args = args
@@ -157,7 +157,7 @@ local function load_config_traced(opts)
     os.exit(1)
   end
 
-  output_dot(opts, nodes, adjastency)
+  output_dot(opts, nodes, adjacency)
 end
 
 
diff --git a/lualib/rspamadm/configwizard.lua b/lualib/rspamadm/configwizard.lua
index 7c2d67cb5..bfbabbf0f 100644
--- a/lualib/rspamadm/configwizard.lua
+++ b/lualib/rspamadm/configwizard.lua
@@ -445,7 +445,7 @@ local function check_redis_classifier(cls, changes)
   end
 
   if not symbol_spam or not symbol_ham then
-    printf("Calssifier has no symbols defined")
+    printf("Classifier has no symbols defined")
     return
   end
 
diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua
index 0864af3fb..e5a7e1c01 100644
--- a/lualib/rspamadm/mime.lua
+++ b/lualib/rspamadm/mime.lua
@@ -381,9 +381,9 @@ local function extract_handler(opts)
     end
 
     if opts.words then
-      local howw = opts['words_format'] or 'stem'
+      local how_words = opts['words_format'] or 'stem'
       table.insert(out_elts[fname], 'meta_words: ' ..
-          print_words(task:get_meta_words(howw), howw == 'full'))
+          print_words(task:get_meta_words(how_words), how_words == 'full'))
     end
 
     if opts.text or opts.html then
@@ -402,9 +402,9 @@ local function extract_handler(opts)
           end
 
           if opts.words then
-            local howw = opts['words_format'] or 'stem'
-            table.insert(out_elts[fname], print_words(part:get_words(howw),
-                howw == 'full'))
+            local how_words = opts['words_format'] or 'stem'
+            table.insert(out_elts[fname], print_words(part:get_words(how_words),
+                how_words == 'full'))
           else
             table.insert(out_elts[fname], tostring(part:get_content(how)))
           end
@@ -416,9 +416,9 @@ local function extract_handler(opts)
           end
 
           if opts.words then
-            local howw = opts['words_format'] or 'stem'
-            table.insert(out_elts[fname], print_words(part:get_words(howw),
-                howw == 'full'))
+            local how_words = opts['words_format'] or 'stem'
+            table.insert(out_elts[fname], print_words(part:get_words(how_words),
+                how_words == 'full'))
           else
             if opts.structure then
               local hc = part:get_html()
diff --git a/rules/bounce.lua b/rules/bounce.lua
index a6e159b16..08e1faef4 100644
--- a/rules/bounce.lua
+++ b/rules/bounce.lua
@@ -67,7 +67,7 @@ rspamd_config.BOUNCE = {
       return true, 1.0, 'DSN'
     end
 
-    -- Apply heuristics for non-standard bounecs
+    -- Apply heuristics for non-standard bounces
     local bounce_sender
     local mime_from = task:get_from('mime')
     if mime_from then
@@ -95,7 +95,7 @@ rspamd_config.BOUNCE = {
 
     -- Look for a message/rfc822(-headers) part inside
     local rfc822_part
-    parts[10] = nil -- limit numbe of parts to check
+    parts[10] = nil -- limit number of parts to check
     for _, p in ipairs(parts) do
       local mime_type, mime_subtype = p:get_type()
       if (mime_subtype == 'rfc822' or mime_subtype == 'rfc822-headers') and
diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua
index 9cdd9c57c..0552be8f7 100644
--- a/rules/headers_checks.lua
+++ b/rules/headers_checks.lua
@@ -344,7 +344,7 @@ local check_mime_id = rspamd_config:register_symbol{
       missing_mime = true
     end
 
-    -- Check presense of MIME specific headers
+    -- Check presence of MIME specific headers
     local has_ct_header = task:has_header('Content-Type')
     local has_cte_header = task:has_header('Content-Transfer-Encoding')
 
diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua
index 15670b4b5..9a01426fc 100644
--- a/rules/regexp/headers.lua
+++ b/rules/regexp/headers.lua
@@ -630,7 +630,7 @@ reconf['FAKE_REPLY'] = {
   group = 'headers'
 }
 
--- Mime-OLE is needed but absent (e.g. fake Outlook or fake Ecxchange)
+-- Mime-OLE is needed but absent (e.g. fake Outlook or fake Exchange)
 local has_msmail_pri = 'header_exists(X-MSMail-Priority)'
 local has_mimeole = 'header_exists(X-MimeOLE)'
 local has_squirrelmail_in_mailer = 'X-Mailer=/SquirrelMail\\b/H'
@@ -838,14 +838,14 @@ reconf['CT_EXTRA_SEMI'] = {
 
 reconf['SUBJECT_ENDS_EXCLAIM'] = {
   re = 'Subject=/!\\s*$/H',
-  description = 'Subject ends with an exclaimation',
+  description = 'Subject ends with an exclamation',
   score = 0.0,
   group = 'headers'
 }
 
 reconf['SUBJECT_HAS_EXCLAIM'] = {
   re = string.format('%s & !%s', 'Subject=/!/H', 'Subject=/!\\s*$/H'),
-  description = 'Subject contains an exclaimation',
+  description = 'Subject contains an exclamation',
   score = 0.0,
   group = 'headers'
 }
@@ -969,7 +969,7 @@ local bad_x_mailers = {
   [[(?:Mozilla )?Thunderbird \d]],
*** OUTPUT TRUNCATED, 2000 LINES SKIPPED ***


More information about the Commits mailing list