From 295d45c0e8b781e056138e869c5c32e876272b9c Mon Sep 17 00:00:00 2001 From: uhziel Date: Tue, 15 Dec 2020 18:17:18 +0800 Subject: =?UTF-8?q?=E6=8C=87=E5=AE=9A=E8=AF=8A=E6=96=AD=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E9=85=8D=E7=BD=AE=E5=8F=AA=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=89=93=E5=BC=80=E7=9A=84=E6=96=87=E4=BB=B6=E8=BF=98=E6=98=AF?= =?UTF-8?q?=E5=85=A8=E9=A1=B9=E7=9B=AE=EF=BC=8C=E5=88=9D=E7=89=88=E8=BF=98?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=94=AF=E6=8C=81vscode=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/proto/define.lua | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'script/proto/define.lua') diff --git a/script/proto/define.lua b/script/proto/define.lua index 6ddcd3a7..88493abe 100644 --- a/script/proto/define.lua +++ b/script/proto/define.lua @@ -168,6 +168,45 @@ m.DiagnosticDefaultSeverity = { ['duplicate-doc-field'] = 'Warning', } +-- 文件状态 +m.FileStatus = { + Any = 1, + Opened = 2, +} + +--- 诊断类型与需要的文件状态(可以控制只分析打开的文件、还是所有文件) +m.DiagnosticDefaultNeededFileStatus = { + ['unused-local'] = 'Opened', + ['unused-function'] = 'Opened', + ['undefined-global'] = 'Any', + ['undefined-field'] = 'Opened', + ['global-in-nil-env'] = 'Any', + ['unused-label'] = 'Opened', + ['unused-vararg'] = 'Opened', + ['trailing-space'] = 'Opened', + ['redefined-local'] = 'Opened', + ['newline-call'] = 'Any', + ['newfield-call'] = 'Any', + ['redundant-parameter'] = 'Opened', + ['ambiguity-1'] = 'Any', + ['lowercase-global'] = 'Any', + ['undefined-env-child'] = 'Any', + ['duplicate-index'] = 'Any', + ['empty-block'] = 'Opened', + ['redundant-value'] = 'Opened', + ['code-after-break'] = 'Opened', + ['unbalanced-assignments'] = 'Any', + + ['duplicate-doc-class'] = 'Any', + ['undefined-doc-class'] = 'Any', + ['undefined-doc-name'] = 'Any', + ['circle-doc-class'] = 'Any', + ['undefined-doc-param'] = 'Any', + ['duplicate-doc-param'] = 'Any', + ['doc-field-no-class'] = 'Any', + ['duplicate-doc-field'] = 'Any', +} + --- 诊断报告标签 m.DiagnosticTag = { Unnecessary = 1, @@ -221,13 +260,6 @@ m.CompletionItemKind = { TypeParameter = 25, } -m.DiagnosticSeverity = { - Error = 1, - Warning = 2, - Information = 3, - Hint = 4, -} - m.ErrorCodes = { -- Defined by JSON RPC ParseError = -32700, -- cgit v1.2.3