diff options
author | Gregor Dschung <gregor@chkpnt.de> | 2020-04-19 11:13:55 +0200 |
---|---|---|
committer | Gregor Dschung <gregor@chkpnt.de> | 2020-04-19 11:13:55 +0200 |
commit | 7a55c51038fa71b4229c4cfbf3cd14044aeb1bc1 (patch) | |
tree | e3e1eac64dd14e5ea8569c564e0fa461d5063d42 /lualib/lua_selectors | |
parent | 7f2cdca0bba88179d8a5cb0b621eb263964525a2 (diff) | |
download | rspamd-7a55c51038fa71b4229c4cfbf3cd14044aeb1bc1.tar.gz rspamd-7a55c51038fa71b4229c4cfbf3cd14044aeb1bc1.zip |
[Minor] Pet luacheck
Diffstat (limited to 'lualib/lua_selectors')
-rw-r--r-- | lualib/lua_selectors/extractors.lua | 3 | ||||
-rw-r--r-- | lualib/lua_selectors/transforms.lua | 11 |
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()} }, |