mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-02 03:58:02 +08:00
CI: added luacheck in CI. (#68)
This commit is contained in:
parent
16e5b64a37
commit
9b901727af
@ -1 +1,3 @@
|
||||
std = "ngx_lua"
|
||||
unused_args = false
|
||||
redefined = false
|
||||
|
@ -16,6 +16,7 @@ addons:
|
||||
- etcd
|
||||
- luarocks
|
||||
- cmake
|
||||
- lua-check
|
||||
|
||||
cache:
|
||||
directories:
|
||||
@ -39,4 +40,5 @@ script:
|
||||
- export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PATH
|
||||
- sudo service etcd start
|
||||
- sudo apisix init_etcd
|
||||
- luacheck -q lua
|
||||
- make test
|
||||
|
@ -12,7 +12,6 @@ local log = require("apisix.core.log")
|
||||
|
||||
|
||||
local _M = {version = 0.1}
|
||||
local mt = { __index = _M }
|
||||
|
||||
|
||||
local function global_lru(key, version, create_obj_fun, ...)
|
||||
|
@ -61,14 +61,14 @@ function class.__meta.__call(cls, ...)
|
||||
return self
|
||||
end
|
||||
|
||||
function class.def(base, type, cls)
|
||||
function class.def(base, typ, cls)
|
||||
base = base or class
|
||||
local mt = {__metatable=base, __index=base}
|
||||
for k, v in pairs(base.__meta) do mt[k] = v end
|
||||
cls = setmetatable(cls or {}, mt)
|
||||
cls.__index = cls
|
||||
cls.__metatable = cls
|
||||
cls.__type = type
|
||||
cls.__type = typ
|
||||
cls.__meta = mt
|
||||
return cls
|
||||
end
|
||||
|
@ -1,5 +1,4 @@
|
||||
local exporter = require("apisix.plugins.prometheus.exporter")
|
||||
local core = require("apisix.core")
|
||||
local plugin_name = "prometheus"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user