]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Apply luacheck suggestions
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 4 Dec 2022 19:48:43 +0000 (19:48 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 4 Dec 2022 19:48:43 +0000 (19:48 +0000)
test/functional/lua/hashes.lua
utils/sa_trivial_convert.lua

index f02e01c4ec6ada4cd82717af0b9af7aec13ad9d2..7a1728b55443bfe1391dc2374beac553f2c49d52 100644 (file)
@@ -59,7 +59,7 @@ rspamd_config:register_symbol({
         h:reset()
       end
       h:update(t['str'])
-      if not (h:hex() == t['hex']) then
+      if h:hex() ~= t['hex'] then
         t['error'] = 'sum mismatch: ' .. h:hex()
         table.insert(worry, logger.slog('%1', t))
       end
index 56a01adfaa4bfd862c3d547823e84a23ca193b70..2ea53bed1edb903d7ef3b1f121dfff05c819d2be 100644 (file)
@@ -99,7 +99,7 @@ local function handle_header_def(hline, cur_rule)
         end
     end
 
-    cur_rule['ordinary'] = ordinary and (not (#hdr_params > 1))
+    cur_rule['ordinary'] = ordinary and #hdr_params <= 1
     cur_rule['header'] = hdr_params
   end
 end
@@ -435,7 +435,7 @@ mmap_conf:close()
 rspamd_logger.messagex('stored multimap conf in %s', 'auto_multimap.conf')
 
 local sa_remain = io.open('auto_sa.conf', 'w')
-fun.each(function(l) 
+fun.each(function(l)
   sa_remain:write(l)
   sa_remain:write('\n')
 end, fun.filter(function(l) return not string.match(l, '^%s+$') end, complicated))