diff --git a/src/luacheck/builtin_standards/init.lua b/src/luacheck/builtin_standards/init.lua index 0d06f053..98cefa3a 100644 --- a/src/luacheck/builtin_standards/init.lua +++ b/src/luacheck/builtin_standards/init.lua @@ -5,6 +5,8 @@ local ngx = require "luacheck.builtin_standards.ngx" local redis5 = require "luacheck.builtin_standards.redis5" local redis6 = require "luacheck.builtin_standards.redis6" local redis7 = require "luacheck.builtin_standards.redis7" +local redis_scripts = require "luacheck.builtin_standards.redis_scripts" +local redis_functions = require "luacheck.builtin_standards.redis_functions" local standards = require "luacheck.standards" local builtin_standards = {} @@ -270,6 +272,8 @@ lua_defs.max = add_defs(lua_defs.lua51c, lua_defs.lua52c, lua_defs.lua53c, lua_d lua_defs.redis5 = add_defs(lua_defs.lua51, redis5) lua_defs.redis6 = add_defs(lua_defs.redis5, redis6) lua_defs.redis7 = add_defs(lua_defs.redis6, redis7) +lua_defs.redis_scripts = redis_scripts +lua_defs.redis_functions = redis_functions for name, def in pairs(lua_defs) do builtin_standards[name] = def_to_std(def) diff --git a/src/luacheck/builtin_standards/redis5.lua b/src/luacheck/builtin_standards/redis5.lua index 4edf0cd4..f8e16ad5 100644 --- a/src/luacheck/builtin_standards/redis5.lua +++ b/src/luacheck/builtin_standards/redis5.lua @@ -2,13 +2,6 @@ local empty = {} local redis = { fields = { - ARGV = { - other_fields = true, - }, - KEYS = { - other_fields = true, - }, - redis = { fields = { call = empty, @@ -19,8 +12,6 @@ local redis = { log = empty, set_repl = empty, replicate_commands = empty, - breakpoint = empty, - debug = empty, }, }, diff --git a/src/luacheck/builtin_standards/redis_functions.lua b/src/luacheck/builtin_standards/redis_functions.lua new file mode 100644 index 00000000..6aef9f1a --- /dev/null +++ b/src/luacheck/builtin_standards/redis_functions.lua @@ -0,0 +1,13 @@ +local empty = {} + +local redis_functions = { + fields = { + redis = { + fields = { + register_function = empty, + }, + } + } +} + +return redis_functions diff --git a/src/luacheck/builtin_standards/redis_scripts.lua b/src/luacheck/builtin_standards/redis_scripts.lua new file mode 100644 index 00000000..3ba72a77 --- /dev/null +++ b/src/luacheck/builtin_standards/redis_scripts.lua @@ -0,0 +1,20 @@ +local empty = {} + +local redis_scripts = { + fields = { + ARGV = { + other_fields = true, + }, + KEYS = { + other_fields = true, + }, + redis = { + fields = { + breakpoint = empty, + debug = empty, + }, + } + } +} + +return redis_scripts