Commit 441f9f4
committed
Add tags to diagnostics
Also removes the diagnostic.Data from the new diagnostics, which AFAICS
is unused; we can save ourselves the json marshaling.
As a part of this, added a first pass at adding tests for diagnostics
- we don't currently have any. These are a bit different because we
haven't implemented [PullDiagnostics][1] (we can add this, but we'd need
a custom implementation, or wait until [go.lsp.dev upgrades to
3.17][2]). Instead, we intercept the notifications from the
server. Lastly, since we don't actually want the tests to wait around,
adds synctest and only runs the tests on Go 1.25 for now (1.26 should be
released next month and we'll be able to upgrade to 1.25 as our
minimum).
This is in preparation to eventually landing relatedInformation (other
spans) in diagnostics, from bufbuild/protocompile#659.
[1]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics
[2]: go-language-server/protocol#521 parent 08df2b3 commit 441f9f4
File tree
9 files changed
+426
-49
lines changed- private/buf/buflsp
- testdata/diagnostics
9 files changed
+426
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
144 | 138 | | |
145 | 139 | | |
146 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 20 | | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 31 | | |
42 | 32 | | |
43 | 33 | | |
| |||
70 | 60 | | |
71 | 61 | | |
72 | 62 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
87 | 67 | | |
88 | 68 | | |
89 | 69 | | |
0 commit comments