diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-04 19:29:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-04 19:29:36 +0800 |
commit | 216f3d54901c6759b99850882a549210f0270745 (patch) | |
tree | 68db79cfcc46134277c9719efc0dd882630e713b /script/proto | |
parent | e39b4a734ec3b4e769a584601f522ba4e5a84a99 (diff) | |
download | lua-language-server-216f3d54901c6759b99850882a549210f0270745.zip |
new dianostic: `count-down-loop`
Diffstat (limited to 'script/proto')
-rw-r--r-- | script/proto/define.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/script/proto/define.lua b/script/proto/define.lua index 50f4cd87..f6f8e9cc 100644 --- a/script/proto/define.lua +++ b/script/proto/define.lua @@ -135,7 +135,14 @@ m.DiagnosticSeverity = { Hint = 4, } +---@alias DiagnosticDefaultSeverity +---| '"Hint"' +---| '"Information"' +---| '"Warning"' +---| '"Error"' + --- 诊断类型与默认等级 +---@type table<string, DiagnosticDefaultSeverity> m.DiagnosticDefaultSeverity = { ['unused-local'] = 'Hint', ['unused-function'] = 'Hint', @@ -158,6 +165,7 @@ m.DiagnosticDefaultSeverity = { ['code-after-break'] = 'Hint', ['unbalanced-assignments'] = 'Warning', ['close-non-object'] = 'Warning', + ['count-down-loop'] = 'Warning', ['duplicate-doc-class'] = 'Warning', ['undefined-doc-class'] = 'Warning', @@ -169,6 +177,10 @@ m.DiagnosticDefaultSeverity = { ['duplicate-doc-field'] = 'Warning', } +---@alias DiagnosticDefaultNeededFileStatus +---| '"Any"' +---| '"Opened"' + -- 文件状态 m.FileStatus = { Any = 1, @@ -176,6 +188,7 @@ m.FileStatus = { } --- 诊断类型与需要的文件状态(可以控制只分析打开的文件、还是所有文件) +---@type table<string, DiagnosticDefaultNeededFileStatus> m.DiagnosticDefaultNeededFileStatus = { ['unused-local'] = 'Opened', ['unused-function'] = 'Opened', @@ -198,6 +211,7 @@ m.DiagnosticDefaultNeededFileStatus = { ['code-after-break'] = 'Opened', ['unbalanced-assignments'] = 'Any', ['close-non-object'] = 'Any', + ['count-down-loop'] = 'Any', ['duplicate-doc-class'] = 'Any', ['undefined-doc-class'] = 'Any', |