Skip to content

Commit

Permalink
[luacheck] openresty provides coroutine._* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mikz committed Feb 1, 2019
1 parent 090566f commit 7d77d96
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
std = 'ngx_lua+lua52' -- lua52 has table.pack
local standards = require "luacheck.standards"

-- stds global is provided by luacheck
-- https://luacheck.readthedocs.io/en/stable/config.html#custom-sets-of-globals
stds.ngx = {
read_globals = {
coroutine = standards.def_fields('_yield', '_create', '_resume')
}
}

std = 'ngx_lua+lua52+ngx' -- lua52 has table.pack

busted = {std = "+busted", globals = { 'fixture' } }
files["**/spec/**/*_spec.lua"] = busted

globals = { 'rawlen' }

files['gateway/config/*.lua'] = { globals = { 'context' } }
files['gateway/config/*.lua'] = { globals = { 'context' } }

0 comments on commit 7d77d96

Please sign in to comment.