summaryrefslogtreecommitdiff
path: root/ale_linters/rust/rustc.vim
diff options
context:
space:
mode:
authorcos <cos>2022-02-03 10:50:30 +0100
committercos <cos>2022-02-19 16:53:08 +0100
commit6822c4a42437e3b3d002247bf48e4159f062c3b2 (patch)
treeb71cc17a2d74655bd3896f5fff73eba50f815fdf /ale_linters/rust/rustc.vim
parent7a3567d3e4d71aa738b1b2061d7b1f09901fc2c4 (diff)
downloadale-6822c4a42437e3b3d002247bf48e4159f062c3b2.zip
wip: Attempt at making cargo working on whole project as documented
(Make cargo work on whole project as documented) According to `:help ale-integration-rust`, using cargo as a linter should check the entire project. It appears this was the case initially, but it broke somewhere along the way. Setting `filename` to the output in the handler and avoid filtering the spans on `file_name` goes a long way in restoring the intended behavior. However test cases fail, even after attempting to update them. Please see next commit.
Diffstat (limited to 'ale_linters/rust/rustc.vim')
-rw-r--r--ale_linters/rust/rustc.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/ale_linters/rust/rustc.vim b/ale_linters/rust/rustc.vim
index bc6431ba..c7a06cc7 100644
--- a/ale_linters/rust/rustc.vim
+++ b/ale_linters/rust/rustc.vim
@@ -2,6 +2,10 @@
" Description: rustc for rust files
call ale#Set('rust_rustc_options', '--emit=mir -o /dev/null')
+" FIXME Both cargo and rustc uses ale#handlers#rust#HandleRustErrors which
+" might or might not require this, depending on the fix for [#1570]
+" (https://github.com/dense-analysis/ale/issues/1570).
+" call ale#Set('rust_only_current_buffer', '0')
function! ale_linters#rust#rustc#RustcCommand(buffer) abort
" Try to guess the library search path. If the project is managed by cargo,