diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-02 22:44:08 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-02 22:44:08 +0100 |
commit | 3573975934f12588e431d902bb477429f635c747 (patch) | |
tree | fd22379339ea0d6e62e37343bdabdd8044a1a873 /test | |
parent | eb8bd26776fbdc57f0162d729260c4847645e145 (diff) | |
download | ale-3573975934f12588e431d902bb477429f635c747.zip |
Fix #410 - Use compile_commands.json files for clang-tidy, and check files on disk instead
Diffstat (limited to 'test')
-rw-r--r-- | test/command_callback/test_clang_tidy_command_callback.vader | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/command_callback/test_clang_tidy_command_callback.vader b/test/command_callback/test_clang_tidy_command_callback.vader new file mode 100644 index 00000000..46d8a3a6 --- /dev/null +++ b/test/command_callback/test_clang_tidy_command_callback.vader @@ -0,0 +1,31 @@ +Before: + Save g:ale_cpp_clangtidy_checks + Save g:ale_cpp_clangtidy_options + runtime ale_linters/cpp/clangtidy.vim + +After: + Restore + call ale#linter#Reset() + +Execute(The clangtidy command default should be correct): + AssertEqual + \ 'clang-tidy -checks=''*'' %s', + \ ale_linters#cpp#clangtidy#GetCommand(bufnr('')) + +Execute(You should be able to remove the -checks option for clang-tidy): + let g:ale_cpp_clangtidy_checks = [] + AssertEqual + \ 'clang-tidy %s', + \ ale_linters#cpp#clangtidy#GetCommand(bufnr('')) + +Execute(You should be able to set other checks for clang-tidy): + let g:ale_cpp_clangtidy_checks = ['-*', 'clang-analyzer-*'] + AssertEqual + \ 'clang-tidy -checks=''-*,clang-analyzer-*'' %s', + \ ale_linters#cpp#clangtidy#GetCommand(bufnr('')) + +Execute(You should be able to manually set compiler flags for clang-tidy): + let g:ale_cpp_clangtidy_options = '-Wall' + AssertEqual + \ 'clang-tidy -checks=''*'' %s -- -Wall', + \ ale_linters#cpp#clangtidy#GetCommand(bufnr('')) |