diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-23 14:39:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-23 14:39:52 +0800 |
commit | 069ff968341e81976c46fd6a260db429b99473f6 (patch) | |
tree | 5b1d5af5ce172903f2e363d2cac79070613e131a /server | |
parent | ea19d0e46ea4828531ad481f6018d334cd0b5999 (diff) | |
download | lua-language-server-069ff968341e81976c46fd6a260db429b99473f6.zip |
因为支持全局变量了,所以去掉一些过时的规则
Diffstat (limited to 'server')
-rw-r--r-- | server/src/core/diagnostics.lua | 5 | ||||
-rw-r--r-- | server/test/diagnostics/init.lua | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua index d88c4fc6..64852f03 100644 --- a/server/src/core/diagnostics.lua +++ b/server/src/core/diagnostics.lua @@ -52,10 +52,7 @@ function mt:searchUndefinedGlobal(callback) goto NEXT_VAR end local lIndex = index:lower() - if lIndex == 'log' or lIndex == '' then - goto NEXT_VAR - end - if index:find '^_*%u' then + if lIndex == '' then goto NEXT_VAR end for _, info in ipairs(field) do diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua index d3e3d0e8..8a2dcf61 100644 --- a/server/test/diagnostics/init.lua +++ b/server/test/diagnostics/init.lua @@ -64,9 +64,9 @@ local <!x!> TEST [[ print(<!x!>) -print(log) -print(X) -print(Log) +print(<!log!>) +print(<!X!>) +print(<!Log!>) print(_VERSION) print(<!y!>) print(z) |