summaryrefslogtreecommitdiff
path: root/test/command_callback/test_cargo_command_callbacks.vader
diff options
context:
space:
mode:
authorLinda_pp <rhysd@users.noreply.github.com>2018-10-22 17:21:48 +0900
committerw0rp <w0rp@users.noreply.github.com>2018-10-22 09:21:48 +0100
commitf57ad883f2ddb0613ffeffa4529269a6bcaf913a (patch)
tree84eff25feebe9f74f1a873a00591f7675b321778 /test/command_callback/test_cargo_command_callbacks.vader
parent3bda13298860da5a88e114d812937e727d4e8f56 (diff)
downloadale-f57ad883f2ddb0613ffeffa4529269a6bcaf913a.zip
Add support for `cargo clippy` (#2001)
* Add support for `cargo clippy` * Add tests for cargo-clippy support * Add an example to doc for how to configure ale_rust_cargo_use_clippy
Diffstat (limited to 'test/command_callback/test_cargo_command_callbacks.vader')
-rw-r--r--test/command_callback/test_cargo_command_callbacks.vader24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/command_callback/test_cargo_command_callbacks.vader b/test/command_callback/test_cargo_command_callbacks.vader
index ac8846b0..f0afbc91 100644
--- a/test/command_callback/test_cargo_command_callbacks.vader
+++ b/test/command_callback/test_cargo_command_callbacks.vader
@@ -128,3 +128,27 @@ Execute(When a crate belongs to a workspace we chdir into the crate, unless we d
\ 'cargo --version',
\ 'cargo check --frozen --message-format=json -q',
\]
+
+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 --version',
+ \ 'cargo clippy --frozen --message-format=json -q ',
+ \]
+
+Execute(When ale_rust_cargo_clippy_options is set, cargo-clippy appends it to commandline):
+ let b:ale_rust_cargo_use_clippy = 1
+ let b:ale_rust_cargo_clippy_options = '-- -D warnings'
+ AssertLinter '', [
+ \ '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
+ let b:ale_rust_cargo_clippy_options = '-- -D warnings'
+ AssertLinter '', [
+ \ 'cargo --version',
+ \ 'cargo check --frozen --message-format=json -q',
+ \]