summaryrefslogtreecommitdiff
path: root/doc/zh-cn
diff options
context:
space:
mode:
authorAndreaWalchshoferSCCH <122894794+AndreaWalchshoferSCCH@users.noreply.github.com>2023-03-22 09:00:56 +0100
committerGitHub <noreply@github.com>2023-03-22 09:00:56 +0100
commit759e2f8c303ed9985b1a7cb9ad4886d705576476 (patch)
treeb46768fb781b04e65e5aca9890e23a7adc0c7513 /doc/zh-cn
parent5b6542e8ff276a195c502cc2479b53685429eb2e (diff)
downloadlua-language-server-759e2f8c303ed9985b1a7cb9ad4886d705576476.zip
Add diagnostic warning about any global (#1)
* Add warning for any global variable via diagnostic * Add messages in en-US TODO: add messages in languages other than en-us as well * fallback: enable/disable diagnostics w/ annotation * Add tests for the new diagnostic * Add diagnostic and group to config.md
Diffstat (limited to 'doc/zh-cn')
-rw-r--r--doc/zh-cn/config.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md
index 991932b6..869e2506 100644
--- a/doc/zh-cn/config.md
+++ b/doc/zh-cn/config.md
@@ -238,6 +238,7 @@ Array<string>
* ``"err-nonstandard-symbol"``
* ``"err-then-as-do"``
* ``"exp-in-action"``
+* ``"global-element"``
* ``"global-in-nil-env"``
* ``"index-in-func-name"``
* ``"invisible"``
@@ -468,6 +469,10 @@ object<string, string>
*/
"strict": "Fallback",
/*
+ * global-element
+ */
+ "strict-convention": "None",
+ /*
* no-unknown
*/
"strong": "Fallback",
@@ -587,6 +592,10 @@ object<string, string>
*/
"strict": "Fallback",
/*
+ * global-element
+ */
+ "strict-convention": "Fallback",
+ /*
* no-unknown
*/
"strong": "Fallback",
@@ -775,6 +784,10 @@ object<string, string>
*/
"empty-block": "Opened",
/*
+ Enable diagnostics to warn about global elements.
+ */
+ "global-element": "None",
+ /*
不能使用全局变量( `_ENV` 被设置为了 `nil`)
*/
"global-in-nil-env": "Any",
@@ -1022,6 +1035,10 @@ object<string, string>
*/
"empty-block": "Hint",
/*
+ Enable diagnostics to warn about global elements.
+ */
+ "global-element": "Warning",
+ /*
不能使用全局变量( `_ENV` 被设置为了 `nil`)
*/
"global-in-nil-env": "Warning",