mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-28 14:56:52 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -57,7 +57,7 @@ Execute(The build directory setting should override the options):
|
||||
\ . ' -checks=' . ale#Escape('*') . ' %s'
|
||||
\ . ' -p ' . ale#Escape('/foo/bar')
|
||||
|
||||
Execute(The build directory should be ignored for header files):
|
||||
Execute(The build directory should be used for header files):
|
||||
call ale#test#SetFilename('test.h')
|
||||
|
||||
let b:ale_c_clangtidy_checks = ['*']
|
||||
@@ -66,12 +66,8 @@ Execute(The build directory should be ignored for header files):
|
||||
|
||||
AssertLinter 'clang-tidy',
|
||||
\ ale#Escape('clang-tidy')
|
||||
\ . ' -checks=' . ale#Escape('*') . ' %s -- -Wall'
|
||||
|
||||
call ale#test#SetFilename('test.h')
|
||||
|
||||
AssertLinter 'clang-tidy',
|
||||
\ ale#Escape('clang-tidy') . ' -checks=' . ale#Escape('*') . ' %s -- -Wall'
|
||||
\ . ' -checks=' . ale#Escape('*') . ' %s'
|
||||
\ . ' -p ' . ale#Escape('/foo/bar')
|
||||
|
||||
Execute(The executable should be configurable):
|
||||
let b:ale_c_clangtidy_checks = ['*']
|
||||
|
||||
@@ -169,10 +169,11 @@ Execute(Build supports all cargo flags):
|
||||
let g:ale_rust_cargo_check_tests = 1
|
||||
let g:ale_rust_cargo_check_examples = 1
|
||||
let b:ale_rust_cargo_default_feature_behavior = 'all'
|
||||
let b:ale_rust_cargo_target_dir = 'target/ale'
|
||||
|
||||
AssertLinter 'cargo', [
|
||||
\ ale#Escape('cargo') . ' --version',
|
||||
\ 'cargo build --all-targets --examples --tests --frozen --message-format=json -q --all-features',
|
||||
\ 'cargo build --all-targets --examples --tests --target-dir ' . ale#Escape('target/ale') . ' --frozen --message-format=json -q --all-features',
|
||||
\]
|
||||
|
||||
Execute(Clippy supports all cargo flags):
|
||||
@@ -182,10 +183,11 @@ Execute(Clippy supports all cargo flags):
|
||||
let g:ale_rust_cargo_check_examples = 1
|
||||
let b:ale_rust_cargo_default_feature_behavior = 'all'
|
||||
let b:ale_rust_cargo_clippy_options = '-D warnings'
|
||||
let b:ale_rust_cargo_target_dir = 'target/ale'
|
||||
|
||||
AssertLinter 'cargo', [
|
||||
\ ale#Escape('cargo') . ' --version',
|
||||
\ 'cargo clippy --all-targets --examples --tests --frozen --message-format=json -q --all-features -- -D warnings',
|
||||
\ 'cargo clippy --all-targets --examples --tests --target-dir ' . ale#Escape('target/ale') . ' --frozen --message-format=json -q --all-features -- -D warnings',
|
||||
\]
|
||||
|
||||
Execute(cargo-check does not refer ale_rust_cargo_clippy_options):
|
||||
@@ -197,3 +199,21 @@ Execute(cargo-check does not refer ale_rust_cargo_clippy_options):
|
||||
\ ale#Escape('cargo') . ' --version',
|
||||
\ 'cargo check --frozen --message-format=json -q',
|
||||
\]
|
||||
|
||||
Execute(`cargo --target-dir` should be used when the version is new enough and it is set):
|
||||
let b:ale_rust_cargo_target_dir = 'target/ale'
|
||||
|
||||
GivenCommandOutput ['cargo 0.17.0 (3423351a5 2017-10-06)']
|
||||
AssertLinter 'cargo', [
|
||||
\ ale#Escape('cargo') . ' --version',
|
||||
\ 'cargo check --target-dir ' . ale#Escape('target/ale') . g:suffix,
|
||||
\]
|
||||
|
||||
Execute(`cargo --target-dir` should not be used when the version is not new enough and it is set):
|
||||
let b:ale_rust_cargo_target_dir = 'target/ale'
|
||||
|
||||
GivenCommandOutput ['cargo 0.16.0 (3423351a5 2017-10-06)']
|
||||
AssertLinter 'cargo', [
|
||||
\ ale#Escape('cargo') . ' --version',
|
||||
\ 'cargo build' . g:suffix,
|
||||
\]
|
||||
|
||||
@@ -57,7 +57,7 @@ Execute(The build directory setting should override the options):
|
||||
\ . ' -checks=' . ale#Escape('*') . ' %s'
|
||||
\ . ' -p ' . ale#Escape('/foo/bar')
|
||||
|
||||
Execute(The build directory should be ignored for header files):
|
||||
Execute(The build directory should be used for header files):
|
||||
call ale#test#SetFilename('test.h')
|
||||
|
||||
let b:ale_cpp_clangtidy_checks = ['*']
|
||||
@@ -66,12 +66,16 @@ Execute(The build directory should be ignored for header files):
|
||||
|
||||
AssertLinter 'clang-tidy',
|
||||
\ ale#Escape('clang-tidy')
|
||||
\ . ' -checks=' . ale#Escape('*') . ' %s -- -Wall'
|
||||
\ . ' -checks=' . ale#Escape('*') . ' %s'
|
||||
\ . ' -p ' . ale#Escape('/foo/bar')
|
||||
\ . ' -- -x c++'
|
||||
|
||||
call ale#test#SetFilename('test.hpp')
|
||||
|
||||
AssertLinter 'clang-tidy',
|
||||
\ ale#Escape('clang-tidy') . ' -checks=' . ale#Escape('*') . ' %s -- -Wall'
|
||||
\ ale#Escape('clang-tidy')
|
||||
\ . ' -checks=' . ale#Escape('*') . ' %s'
|
||||
\ . ' -p ' . ale#Escape('/foo/bar')
|
||||
|
||||
Execute(The executable should be configurable):
|
||||
let b:ale_cpp_clangtidy_checks = ['*']
|
||||
|
||||
@@ -34,18 +34,20 @@ Execute(The build directory should be configurable):
|
||||
\ ale#Escape('clazy-standalone')
|
||||
\ . ' -checks=' . ale#Escape('level1') . ' -p ' . ale#Escape('/foo/bar') . ' %s'
|
||||
|
||||
Execute(The build directory should be ignored for header files):
|
||||
Execute(The build directory should be used for header files):
|
||||
call ale#test#SetFilename('test.h')
|
||||
|
||||
let b:ale_c_build_dir = '/foo/bar'
|
||||
|
||||
AssertLinter 'clazy-standalone',
|
||||
\ ale#Escape('clazy-standalone') . ' -checks=' . ale#Escape('level1') . ' %s'
|
||||
\ ale#Escape('clazy-standalone')
|
||||
\ . ' -checks=' . ale#Escape('level1') . ' -p ' . ale#Escape('/foo/bar') . ' %s'
|
||||
|
||||
call ale#test#SetFilename('test.hpp')
|
||||
|
||||
AssertLinter 'clazy-standalone',
|
||||
\ ale#Escape('clazy-standalone') . ' -checks=' . ale#Escape('level1') . ' %s'
|
||||
\ ale#Escape('clazy-standalone')
|
||||
\ . ' -checks=' . ale#Escape('level1') . ' -p ' . ale#Escape('/foo/bar') . ' %s'
|
||||
|
||||
Execute(The executable should be configurable):
|
||||
let b:ale_cpp_clazy_executable = 'foobar'
|
||||
|
||||
Reference in New Issue
Block a user