aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-19 21:27:43 +0100
committerGitHub <noreply@github.com>2020-04-19 21:27:43 +0100
commit7457d466d9e0d8186e1141f89b6265c13b7140ea (patch)
tree1758fc4e0508049e66be56f29c69facbd321f907 /lualib
parent509109df4cc67f053955a5b9db86226a64e6a257 (diff)
parent7a55c51038fa71b4229c4cfbf3cd14044aeb1bc1 (diff)
downloadrspamd-7457d466d9e0d8186e1141f89b6265c13b7140ea.tar.gz
rspamd-7457d466d9e0d8186e1141f89b6265c13b7140ea.zip
Merge pull request #3343 from chkpnt/dschung/luacheck
[Minor] Pet luacheck
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_selectors/extractors.lua3
-rw-r--r--lualib/lua_selectors/transforms.lua11
2 files changed, 9 insertions, 5 deletions
diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua
index 695371e79..c01a07f4b 100644
--- a/lualib/lua_selectors/extractors.lua
+++ b/lualib/lua_selectors/extractors.lua
@@ -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}
},
diff --git a/lualib/lua_selectors/transforms.lua b/lualib/lua_selectors/transforms.lua
index 4cfff3654..85a445f67 100644
--- a/lualib/lua_selectors/transforms.lua
+++ b/lualib/lua_selectors/transforms.lua
@@ -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()}
},