-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[luacheck] openresty provides coroutine._* methods
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' } } |