]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Pet luacheck 3343/head
authorGregor Dschung <gregor@chkpnt.de>
Sun, 19 Apr 2020 09:13:55 +0000 (11:13 +0200)
committerGregor Dschung <gregor@chkpnt.de>
Sun, 19 Apr 2020 09:13:55 +0000 (11:13 +0200)
lualib/lua_selectors/extractors.lua
lualib/lua_selectors/transforms.lua
src/plugins/lua/force_actions.lua

index 695371e79b94aab0e2ab955bcb9889f182eb2d37..c01a07f4b3b8c1ea838b0641fb1d769c09288f34 100644 (file)
@@ -423,7 +423,8 @@ The first argument must be header name.]],
         return symbol[1],'table'
       end
     end,
-    ['description'] = [[Get specific symbol. The first argument must be the symbol name. Returns the symbol table. See task:get_symbol()]],
+    ['description'] = 'Get specific symbol. The first argument must be the symbol name. ' ..
+      'Returns the symbol table. See task:get_symbol()',
     ['args_schema'] = {ts.string}
   },
 
index 4cfff36543707a918904b618e51bb4ef3935cf9c..85a445f676064eb7935d88989af3a93e403f6d9c 100644 (file)
@@ -413,7 +413,7 @@ Empty string comes the first argument or 'true', non-empty string comes nil]],
       end
     end,
     ['description'] = 'Applies mask to IP address.' ..
-        ' The first argument is the mask for IPv4 addresses, the second is the mask for IPv6 addresses.',
+      ' The first argument is the mask for IPv4 addresses, the second is the mask for IPv6 addresses.',
     ['args_schema'] = {(ts.number + ts.string / tonumber),
                        (ts.number + ts.string / tonumber):is_optional()}
   },
@@ -426,13 +426,16 @@ Empty string comes the first argument or 'true', non-empty string comes nil]],
     ['map_type'] = 'string',
     ['process'] = function(inp, _, args)
       if type(inp) == 'table' then
-        return fun.map( function(s) return string.gsub(tostring(s), '[\128-\255]', args[1] or '?') end , inp), 'string_list'
+        return fun.map(
+          function(s)
+            return string.gsub(tostring(s), '[\128-\255]', args[1] or '?')
+          end, inp), 'string_list'
       else 
         return string.gsub(tostring(inp), '[\128-\255]', '?'), 'string'
       end
-         
     end,
-    ['description'] = 'Returns the string with all non-ascii bytes replaced with the character given as second argument or `?`',
+    ['description'] = 'Returns the string with all non-ascii bytes replaced with the character ' ..
+      'given as second argument or `?`',
     ['args_schema'] = {ts.string:is_optional()}
   },
 
index eda87ead093cc404a27123dbe5dae33f776c488f..9654a836e23ac6f8f0425c94c32f00adb8a10e2f 100644 (file)
@@ -69,7 +69,7 @@ local function gen_cb(expr, act, pool, message, subject, raction, honor, limit,
       -- create/reuse selector to extract value for this placeholder
       local selector = selector_cache[selector_expr]
       if not selector then
-       selector_cache[selector_expr] = lua_selectors.create_selector_closure(rspamd_config, selector_expr, '', true)
+        selector_cache[selector_expr] = lua_selectors.create_selector_closure(rspamd_config, selector_expr, '', true)
         selector = selector_cache[selector_expr]
         if not selector then 
           rspamd_logger.errx(task, 'could not create selector [%1]', selector_expr)