diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-11-14 20:39:16 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-11-15 17:30:39 +0200 |
commit | da83f5296a9e41bc55c8a5bd83fdc3bfd7bf5f54 (patch) | |
tree | 14bc67a2c9af086a375335621457f404df6bea19 /src/rspamadm/confighelp.lua | |
parent | fc406133889dc128f44e351c3198994c2e8d1b8e (diff) | |
download | rspamd-da83f5296a9e41bc55c8a5bd83fdc3bfd7bf5f54.tar.gz rspamd-da83f5296a9e41bc55c8a5bd83fdc3bfd7bf5f54.zip |
[Minor] Lint rspamadm & test suite scripts
Diffstat (limited to 'src/rspamadm/confighelp.lua')
-rw-r--r-- | src/rspamadm/confighelp.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rspamadm/confighelp.lua b/src/rspamadm/confighelp.lua index 3af3c5b1f..0d61bf394 100644 --- a/src/rspamadm/confighelp.lua +++ b/src/rspamadm/confighelp.lua @@ -1,4 +1,3 @@ -local util = require "rspamd_util" local opts = {} local known_attrs = { data = 1, @@ -20,7 +19,7 @@ local function maybe_print_color(key) end end -local function sort_values(tbl, opts) +local function sort_values(tbl) local res = {} for k, v in pairs(tbl) do table.insert(res, { key = k, value = v }) @@ -91,7 +90,7 @@ local function print_help(key, value, tabs) end local sorted = sort_values(value) - for i, v in ipairs(sorted) do + for _, v in ipairs(sorted) do if not known_attrs[v['key']] then -- We need to go deeper print_help(v['key'], v['value'], tabs .. '\t') @@ -104,7 +103,7 @@ return function(args, res) local sorted = sort_values(res) - for i,v in ipairs(sorted) do + for _,v in ipairs(sorted) do print_help(v['key'], v['value'], '') print('') end |