summaryrefslogtreecommitdiff
path: root/test/command_callback/test_cargo_command_callbacks.vader
diff options
context:
space:
mode:
authorJean Mertz <jean@mertz.fm>2019-06-24 19:47:49 +0200
committerJean Mertz <jean@mertz.fm>2019-06-24 19:47:49 +0200
commite52388b8b1361198a6d2668a1fcaa4b78729187f (patch)
treed544bc43bffbe45fa118359c611bfc3e9673c788 /test/command_callback/test_cargo_command_callbacks.vader
parent65ba4b85ec3011cccb9ea7135183e7fc8d7a0d69 (diff)
downloadale-e52388b8b1361198a6d2668a1fcaa4b78729187f.zip
support clippy options with --
Diffstat (limited to 'test/command_callback/test_cargo_command_callbacks.vader')
-rw-r--r--test/command_callback/test_cargo_command_callbacks.vader10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/command_callback/test_cargo_command_callbacks.vader b/test/command_callback/test_cargo_command_callbacks.vader
index 438c97db..42ca0301 100644
--- a/test/command_callback/test_cargo_command_callbacks.vader
+++ b/test/command_callback/test_cargo_command_callbacks.vader
@@ -141,7 +141,7 @@ Execute(When ale_rust_cargo_use_clippy is set, cargo-clippy is used as linter):
let b:ale_rust_cargo_use_clippy = 1
AssertLinter 'cargo', [
\ ale#Escape('cargo') . ' --version',
- \ 'cargo clippy --frozen --message-format=json -q ',
+ \ 'cargo clippy --frozen --message-format=json -q',
\]
Execute(When ale_rust_cargo_clippy_options is set, cargo-clippy appends it to commandline):
@@ -152,6 +152,14 @@ Execute(When ale_rust_cargo_clippy_options is set, cargo-clippy appends it to co
\ 'cargo clippy --frozen --message-format=json -q -- -D warnings',
\]
+Execute(When ale_rust_cargo_clippy_options does not start with --, it is added):
+ let b:ale_rust_cargo_use_clippy = 1
+ let b:ale_rust_cargo_clippy_options = '-D warnings'
+ AssertLinter 'cargo', [
+ \ ale#Escape('cargo') . ' --version',
+ \ 'cargo clippy --frozen --message-format=json -q -- -D warnings',
+ \]
+
Execute(cargo-check does not refer ale_rust_cargo_clippy_options):
let b:ale_rust_cargo_use_clippy = 0
let b:ale_rust_cargo_use_check = 1