We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f635d1a + 95988f0 commit c917fe2Copy full SHA for c917fe2
handler.go
@@ -33,10 +33,17 @@ type langHandler struct {
33
rootDir string
34
}
35
36
+// As defined in the `golangci-lint` source code:
37
+// https://github.com/golangci/golangci-lint/blob/main/pkg/exitcodes/exitcodes.go#L24
38
+const GoNoFilesExitCode = 5
39
+
40
func (h *langHandler) errToDiagnostics(err error) []Diagnostic {
41
var message string
42
switch e := err.(type) {
43
case *exec.ExitError:
44
+ if e.ExitCode() == GoNoFilesExitCode {
45
+ return []Diagnostic{}
46
+ }
47
message = string(e.Stderr)
48
default:
49
h.logger.DebugJSON("golangci-lint-langserver: errToDiagnostics message", message)
0 commit comments