local config = require 'config' TEST [[ local ]] TEST [[ local y local x = y ]] TEST [[ local function x() end x() ]] TEST [[ return function (x) x.a = 1 end ]] TEST [[ local = {} .a = 1 ]] TEST [[ InstanceName = 1 Instance = _G[InstanceName] ]] TEST [[ local _ = (''):sub(1, 2) ]] TEST [[ local mt, x function mt:m() function x:m() end end return mt, x ]] TEST [[ local mt = {} function mt:f() end return mt ]] TEST [[ local = {} function :f() end ]] TEST [[ local = {} .a = 1 ]] TEST [[ local = {} ['a'] = 1 ]] TEST [[ local function f() return 'something' end f() ]] TEST [[ local function f(var) print(var) end local var f(var) ]] TEST [[ local = {} [1] = 1 ]] config.add(nil, 'Lua.diagnostics.unusedLocalExclude', 'll_*') TEST [[ local local ll_1 local ll_2 local ]] config.remove(nil, 'Lua.diagnostics.unusedLocalExclude', 'll_*')