mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-02 03:58:02 +08:00
test: check lua code style in all Lua file under apisix/ (#1518)
This commit is contained in:
parent
a53b4707fb
commit
06acbe9047
@ -17,6 +17,7 @@
|
||||
local base_prometheus = require("resty.prometheus")
|
||||
local core = require("apisix.core")
|
||||
local ipairs = ipairs
|
||||
local ngx = ngx
|
||||
local ngx_capture = ngx.location.capture
|
||||
local re_gmatch = ngx.re.gmatch
|
||||
local prometheus
|
||||
|
@ -17,6 +17,10 @@
|
||||
local core = require("apisix.core")
|
||||
local to_hex = require "resty.string".to_hex
|
||||
local new_span_context = require("opentracing.span_context").new
|
||||
local ngx = ngx
|
||||
local string = string
|
||||
local pairs = pairs
|
||||
local tonumber = tonumber
|
||||
|
||||
local function hex_to_char(c)
|
||||
return string.char(tonumber(c, 16))
|
||||
|
@ -14,6 +14,12 @@
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
--
|
||||
local assert = assert
|
||||
local type = type
|
||||
local setmetatable = setmetatable
|
||||
local math = math
|
||||
|
||||
|
||||
local _M = {}
|
||||
local mt = { __index = _M }
|
||||
|
||||
|
@ -18,6 +18,11 @@ local resty_http = require "resty.http"
|
||||
local to_hex = require "resty.string".to_hex
|
||||
local cjson = require "cjson".new()
|
||||
cjson.encode_number_precision(16)
|
||||
local assert = assert
|
||||
local type = type
|
||||
local setmetatable = setmetatable
|
||||
local math = math
|
||||
local tostring = tostring
|
||||
|
||||
|
||||
local _M = {}
|
||||
|
@ -16,6 +16,8 @@
|
||||
--
|
||||
local core = require("apisix.core")
|
||||
local balancer = require("ngx.balancer")
|
||||
local bit = require "bit"
|
||||
local ngx = ngx
|
||||
local ngx_exit = ngx.exit
|
||||
local str_byte = string.byte
|
||||
local str_sub = string.sub
|
||||
|
@ -21,15 +21,7 @@ set -ex
|
||||
|
||||
luacheck -q apisix
|
||||
|
||||
./utils/lj-releng \
|
||||
apisix/*.lua \
|
||||
apisix/admin/*.lua \
|
||||
apisix/core/*.lua \
|
||||
apisix/http/*.lua \
|
||||
apisix/http/router/*.lua \
|
||||
apisix/plugins/*.lua \
|
||||
apisix/plugins/grpc-transcode/*.lua \
|
||||
apisix/plugins/limit-count/*.lua > \
|
||||
find apisix -name '*.lua' -exec ./utils/lj-releng {} + > \
|
||||
/tmp/check.log 2>&1 || (cat /tmp/check.log && exit 1)
|
||||
|
||||
grep -E "ERROR.*.lua:" /tmp/check.log > /tmp/error.log | true
|
||||
|
Loading…
Reference in New Issue
Block a user