summaryrefslogtreecommitdiff
path: root/ale_linters/rust
diff options
context:
space:
mode:
authorJean Mertz <jean@mertz.fm>2019-06-24 19:55:49 +0200
committerJean Mertz <jean@mertz.fm>2019-06-25 11:22:36 +0200
commit53b0e6c37dc8c377a09f97b8aa20e283b1aa305d (patch)
treeb4e36653e0a725911738efa78f8b6096c11e53c3 /ale_linters/rust
parente52388b8b1361198a6d2668a1fcaa4b78729187f (diff)
downloadale-53b0e6c37dc8c377a09f97b8aa20e283b1aa305d.zip
support all cargo options for build/clippy
Diffstat (limited to 'ale_linters/rust')
-rw-r--r--ale_linters/rust/cargo.vim13
1 files changed, 5 insertions, 8 deletions
diff --git a/ale_linters/rust/cargo.vim b/ale_linters/rust/cargo.vim
index 8ea6f19c..99178585 100644
--- a/ale_linters/rust/cargo.vim
+++ b/ale_linters/rust/cargo.vim
@@ -25,14 +25,11 @@ endfunction
function! ale_linters#rust#cargo#GetCommand(buffer, version) abort
let l:use_check = ale#Var(a:buffer, 'rust_cargo_use_check')
\ && ale#semver#GTE(a:version, [0, 17, 0])
- let l:use_all_targets = l:use_check
- \ && ale#Var(a:buffer, 'rust_cargo_check_all_targets')
+ let l:use_all_targets = ale#Var(a:buffer, 'rust_cargo_check_all_targets')
\ && ale#semver#GTE(a:version, [0, 22, 0])
- let l:use_examples = l:use_check
- \ && ale#Var(a:buffer, 'rust_cargo_check_examples')
+ let l:use_examples = ale#Var(a:buffer, 'rust_cargo_check_examples')
\ && ale#semver#GTE(a:version, [0, 22, 0])
- let l:use_tests = l:use_check
- \ && ale#Var(a:buffer, 'rust_cargo_check_tests')
+ let l:use_tests = ale#Var(a:buffer, 'rust_cargo_check_tests')
\ && ale#semver#GTE(a:version, [0, 22, 0])
let l:include_features = ale#Var(a:buffer, 'rust_cargo_include_features')
@@ -69,9 +66,9 @@ function! ale_linters#rust#cargo#GetCommand(buffer, version) abort
if ale#Var(a:buffer, 'rust_cargo_use_clippy')
let l:subcommand = 'clippy'
-
let l:clippy_options = ale#Var(a:buffer, 'rust_cargo_clippy_options')
- if l:clippy_options =~ "^-- "
+
+ if l:clippy_options =~# '^-- '
let l:clippy_options = join(split(l:clippy_options, '-- '))
endif