Enable lj-releng tool to lint lua code.

This commit is contained in:
agile6v 2020-06-06 23:07:06 +08:00
parent 36f7dd2e0b
commit bafbd4cccf
36 changed files with 213 additions and 93 deletions

View file

@ -5,6 +5,11 @@ local resty_chash = require("resty.chash")
local util = require("util")
local ngx_log = ngx.log
local ngx_ERR = ngx.ERR
local setmetatable = setmetatable
local tostring = tostring
local math = math
local table = table
local pairs = pairs
local _M = { name = "chashsubset" }
@ -46,7 +51,8 @@ end
function _M.new(self, backend)
local subset_map, subsets = build_subset_map(backend)
local complex_val, err = util.parse_complex_value(backend["upstreamHashByConfig"]["upstream-hash-by"])
local complex_val, err =
util.parse_complex_value(backend["upstreamHashByConfig"]["upstream-hash-by"])
if err ~= nil then
ngx_log(ngx_ERR, "could not parse the value of the upstream-hash-by: ", err)
end