summaryrefslogtreecommitdiff
path: root/test/diagnostics/uppercase-local.lua
diff options
context:
space:
mode:
authorAndreaWalchshoferSCCH <andrea.walchshofer@scch.at>2023-04-24 11:03:18 +0200
committerAndreaWalchshoferSCCH <andrea.walchshofer@scch.at>2023-04-24 11:03:18 +0200
commit171703c12f571d15550aacc40a45cc6a312d8b1d (patch)
treecceb1c66d2406b8e1690274e0da15bd89ac7c762 /test/diagnostics/uppercase-local.lua
parentcff12c89285d5039cb24634b737837e8a94399f5 (diff)
downloadlua-language-server-171703c12f571d15550aacc40a45cc6a312d8b1d.zip
Cleanup PR
Revert Changes made from unrelated PR
Diffstat (limited to 'test/diagnostics/uppercase-local.lua')
-rw-r--r--test/diagnostics/uppercase-local.lua66
1 files changed, 0 insertions, 66 deletions
diff --git a/test/diagnostics/uppercase-local.lua b/test/diagnostics/uppercase-local.lua
deleted file mode 100644
index fc0b95d1..00000000
--- a/test/diagnostics/uppercase-local.lua
+++ /dev/null
@@ -1,66 +0,0 @@
-local config = require 'config'
-local util = require 'utility'
-
--- disable all default groups to make isolated tests
-config.set(nil, 'Lua.diagnostics.groupFileStatus',
-{
- ['ambiguity'] = 'None',
- ['await'] = 'None',
- ['codestyle'] = 'None',
- ['conventions'] = 'None',
- ['duplicate'] = 'None',
- ['global'] = 'None',
- ['luadoc'] = 'None',
- ['redefined'] = 'None',
- ['strict'] = 'None',
- ['strong'] = 'None',
- ['type-check'] = 'None',
- ['unbalanced'] = 'None',
- ['unused'] = 'None'
-})
-
--- enable single diagnostic that is to be tested
-config.set(nil, 'Lua.diagnostics.neededFileStatus',
-{
- ['uppercase-local'] = 'Any!' -- override groupFileStatus
-})
-
--- check that global elements are not warned about
-TEST [[
-Var1 = "global"
-VAR2 = "global"
-
-local x = true
-local <!Y!> = false
-local <!Var!> = false
-]]
-
-TEST [[
-local function test1()
- print()
-end
-
-local function <!Test2!>()
- print()
-end
-]]
-
-TEST [[
-local function closure1()
- local elem1 = 1
- local <!Elem2!> = 2
-end
-
-local function <!Closure2!>()
- local elem1 = 1
- local <!Elem2!> = 2
-end
-]]
-
--- reset configurations
-config.set(nil, 'Lua.diagnostics.groupFileStatus',
-{})
-config.set(nil, 'Lua.diagnostics.neededFileStatus',
-{})
-config.set(nil, 'Lua.diagnostics.globals',
-{})