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 9db5546 + 3ba99d5 commit 0ee3aa9Copy full SHA for 0ee3aa9
handler.go
@@ -30,23 +30,23 @@ type langHandler struct {
30
}
31
32
func (h *langHandler) lint(uri DocumentURI) ([]Diagnostic, error) {
33
+ diagnostics := make([]Diagnostic, 0)
34
+
35
//nolint:gosec
36
cmd := exec.Command(h.command[0], h.command[1:]...)
37
38
b, err := cmd.CombinedOutput()
39
if err == nil {
- return nil, nil
40
+ return diagnostics, nil
41
42
43
var result GolangCILintResult
44
if err := json.Unmarshal(b, &result); err != nil {
- return nil, err
45
+ return diagnostics, err
46
47
48
h.logger.DebugJSON("golangci-lint-langserver: result:", result)
49
- diagnostics := make([]Diagnostic, 0)
-
50
for _, issue := range result.Issues {
51
issue := issue
52
0 commit comments