summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
authorAndreaWalchshoferSCCH <122894794+AndreaWalchshoferSCCH@users.noreply.github.com>2023-03-30 15:52:53 +0200
committerGitHub <noreply@github.com>2023-03-30 15:52:53 +0200
commit4eb508f5390b3de5aeb59e9e6cb5c0742c9ee97b (patch)
tree47b4b4583aefd4693cde2395ab063c0e96a8f27c /test/diagnostics
parent43794193ef981ffecb477bfce444428ded852aa0 (diff)
downloadlua-language-server-4eb508f5390b3de5aeb59e9e6cb5c0742c9ee97b.zip
Revert "Add diagnostic to enforce lowercase local element names (#2)" (#5)
This reverts commit 43794193ef981ffecb477bfce444428ded852aa0.
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/init.lua3
-rw-r--r--test/diagnostics/uppercase-local.lua66
2 files changed, 1 insertions, 68 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index a18e5cea..4025dd8c 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -86,5 +86,4 @@ end
require 'diagnostics.common'
require 'diagnostics.type-check'
-require 'diagnostics.global-element'
-require 'diagnostics.uppercase-local' \ No newline at end of file
+require 'diagnostics.global-element' \ No newline at end of file
diff --git a/test/diagnostics/uppercase-local.lua b/test/diagnostics/uppercase-local.lua
deleted file mode 100644
index fb8b726d..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',
- ['strict-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',
-{}) \ No newline at end of file