local config = require 'config' TEST [[ local x = 123 x = 321 = "global" = "global" ]] TEST [[ local function test1() print() end function () print() end ]] TEST [[ local function closure1() local elem1 = 1 = 2 end function () local elem1 = 1 = 2 end ]] -- add elements to exemption list config.set(nil, 'Lua.diagnostics.globals', { 'GLOBAL1', 'GLOBAL2', 'GLOBAL_CLOSURE' }) TEST [[ GLOBAL1 = "allowed" = "not allowed" = "not allowed" ]] TEST [[ function GLOBAL1() print() end ]] TEST [[ local function closure1() local elem1 = 1 GLOBAL1 = 2 end function GLOBAL_CLOSURE() local elem1 = 1 GLOBAL2 = 2 = 2 end ]]