Commit a686a77
committed
Add a defcustom to control default diagnostic severity.
Previously, there was a Flycheck specific defcustom, which was used to
select a default error level for Flycheck. However, there was nothing
for Flymake. Additionally, there were numerous other places in
lsp-mode which query the severity attribute of the diagnostic, such as
for statistics, modeline, headerline, etc. All of these were being
handled inconsistently, either not at all (causing an error when the
attribute was not sent by the server), ignoring it when it was
missing (causing statistics to be inaccurate) or assuming a default of
error, which might have been different than the Flycheck specific
configuration, therefore causing an inconsistency in the modeline
statistics vs what Flycheck would report.
This change creates a common defcustom which is then used anywhere the
diagnostic severity is needed, but was not provided by the server.
This should create consistent statistics between the modeline and the
back-end checkers. Additionally, the mapping between this defcustom
and the checker specific values happens in the diagnostic package.
Since this defcustom is used outside of the lsp-diagnostic package, it
resides in the lsp-mode package and renamed more generally.
Additionally, the Flycheck specific defcustom has been obsoleted.1 parent 5a20661 commit a686a77
File tree
4 files changed
+56
-32
lines changed4 files changed
+56
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
| |||
131 | 127 | | |
132 | 128 | | |
133 | 129 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
146 | 143 | | |
147 | 144 | | |
148 | 145 | | |
| |||
305 | 302 | | |
306 | 303 | | |
307 | 304 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
316 | 313 | | |
317 | 314 | | |
318 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
310 | 314 | | |
311 | 315 | | |
312 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
637 | 646 | | |
638 | 647 | | |
639 | 648 | | |
| |||
2277 | 2286 | | |
2278 | 2287 | | |
2279 | 2288 | | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
2280 | 2297 | | |
2281 | 2298 | | |
2282 | 2299 | | |
| |||
2296 | 2313 | | |
2297 | 2314 | | |
2298 | 2315 | | |
2299 | | - | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
2300 | 2319 | | |
2301 | 2320 | | |
2302 | 2321 | | |
2303 | | - | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
2304 | 2325 | | |
2305 | 2326 | | |
2306 | 2327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
0 commit comments