Include span label in rust lints (#601)
* Include span label in rust lints
This turns relatively unhelpful error messages like
mismatched types
into more expressive messages along the lines of
mismatched types: expected bool, found integral variable
Fixes #597.
* Exclude rust lint span label if empty
* Use single-quoted strings in vimscript
* Add test for detailed rust errors
* Prune Cargo JSON
* Use matching error file name
* Byte offsets not char offsets
This commit is contained in:
@@ -55,7 +55,7 @@ function! ale#handlers#rust#HandleRustErrorsForFile(buffer, full_filename, lines
|
||||
\ 'end_lnum': l:span.line_end,
|
||||
\ 'col': l:span.byte_start,
|
||||
\ 'end_col': l:span.byte_end,
|
||||
\ 'text': l:error.message,
|
||||
\ 'text': empty(l:span.label) ? l:error.message : printf('%s: %s', l:error.message, l:span.label),
|
||||
\ 'type': toupper(l:error.level[0]),
|
||||
\})
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user