Skip to content

Commit 3193011

Browse files
committed
优化:#85 当luacheckrc存在语法错误时,输出告警信息
1 parent 04457c3 commit 3193011

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

server/providers/lib/linters.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ class Luacheck {
102102
return diagnostics;
103103
}
104104

105+
if (data.stderr != null && data.stderr.length > 0) {
106+
diagnostics.push(langserver_1.Diagnostic.create(
107+
langserver_1.Range.create(0, 0, 0, 0),
108+
data.stderr,
109+
langserver_1.DiagnosticSeverity.Error,
110+
-1, "luacheck"
111+
));
112+
return diagnostics;
113+
}
114+
105115
if (data.stdout === undefined) {
106116
return diagnostics;
107117
}

0 commit comments

Comments
 (0)