aboutsummaryrefslogtreecommitdiffstats
path: root/rules/rspamd.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 11:41:28 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 11:41:28 +0100
commit662145d0554de5e769b92dab2d41173a98adcee5 (patch)
treeec28311a0bce6181f248ba7b50304293ad764e44 /rules/rspamd.lua
parentbbd88232db43d18f5e0de5a6502848d4074621c5 (diff)
downloadrspamd-662145d0554de5e769b92dab2d41173a98adcee5.tar.gz
rspamd-662145d0554de5e769b92dab2d41173a98adcee5.zip
[Minor] Reformat all Lua code, no functional changes
Diffstat (limited to 'rules/rspamd.lua')
-rw-r--r--rules/rspamd.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/rules/rspamd.lua b/rules/rspamd.lua
index 5d93dec00..39017f169 100644
--- a/rules/rspamd.lua
+++ b/rules/rspamd.lua
@@ -16,7 +16,7 @@ limitations under the License.
-- This is main lua config file for rspamd
-require "global_functions" ()
+require "global_functions"()
config['regexp'] = {}
rspamd_maps = {} -- Global maps
@@ -53,11 +53,13 @@ if rspamd_util.file_exists(local_conf .. '/local.d/rspamd.lua') then
dofile(local_conf .. '/local.d/rspamd.lua')
end
-local rmaps = rspamd_config:get_all_opt("lua_maps")
+local rmaps = rspamd_config:get_all_opt("lua_maps")
if rmaps and type(rmaps) == 'table' then
local rspamd_logger = require "rspamd_logger"
- for k,v in pairs(rmaps) do
- local status,map_or_err = pcall(function () return rspamd_config:add_map(v) end)
+ for k, v in pairs(rmaps) do
+ local status, map_or_err = pcall(function()
+ return rspamd_config:add_map(v)
+ end)
if not status then
rspamd_logger.errx(rspamd_config, "cannot add map %s: %s", k, map_or_err)