diff options
author | Jon Gjengset <jon@thesquareplanet.com> | 2017-05-31 13:16:49 -0400 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-05-31 18:16:49 +0100 |
commit | 88948e0ee3729b9b31b7cfd7e0efd5fe15143621 (patch) | |
tree | b92942c9a33cf6f23d1b7d053cff5d3cc3b28f7a /autoload | |
parent | 42efd517232c3f62289910e53f1d2fe2549196cf (diff) | |
download | ale-88948e0ee3729b9b31b7cfd7e0efd5fe15143621.zip |
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
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/rust.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/ale/handlers/rust.vim b/autoload/ale/handlers/rust.vim index 5781e619..47b3c7f2 100644 --- a/autoload/ale/handlers/rust.vim +++ b/autoload/ale/handlers/rust.vim @@ -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 |