mirror of
https://github.com/amix/vimrc
synced 2025-07-12 06:05:01 +08:00
.
This commit is contained in:
0
sources_non_forked/ale/ale_linters/cpp/cc.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/cc.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/ccls.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/ccls.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/clangcheck.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/clangcheck.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/clangd.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/clangd.vim
Normal file → Executable file
13
sources_non_forked/ale/ale_linters/cpp/clangtidy.vim
Normal file → Executable file
13
sources_non_forked/ale/ale_linters/cpp/clangtidy.vim
Normal file → Executable file
@ -23,19 +23,18 @@ function! ale_linters#cpp#clangtidy#GetCommand(buffer, output) abort
|
||||
let l:options = ale#Var(a:buffer, 'cpp_clangtidy_options')
|
||||
let l:cflags = ale#c#GetCFlags(a:buffer, a:output)
|
||||
let l:options .= !empty(l:options) ? ale#Pad(l:cflags) : l:cflags
|
||||
endif
|
||||
|
||||
" Tell clang-tidy a .h header with a C++ filetype in Vim is a C++ file.
|
||||
if expand('#' . a:buffer) =~# '\.h$'
|
||||
let l:options .= !empty(l:options) ? ' -x c++' : '-x c++'
|
||||
" Tell clang-tidy a .h header with a C++ filetype in Vim is a C++ file
|
||||
" only when compile-commands.json file is not there. Adding these
|
||||
" flags makes clang-tidy completely ignore compile commmands.
|
||||
if expand('#' . a:buffer) =~# '\.h$'
|
||||
let l:options .= !empty(l:options) ? ' -x c++' : '-x c++'
|
||||
endif
|
||||
endif
|
||||
|
||||
" Get the options to pass directly to clang-tidy
|
||||
let l:extra_options = ale#Var(a:buffer, 'cpp_clangtidy_extra_options')
|
||||
|
||||
" Get the options to pass directly to clang-tidy
|
||||
let l:extra_options = ale#Var(a:buffer, 'cpp_clangtidy_extra_options')
|
||||
|
||||
return '%e'
|
||||
\ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '')
|
||||
\ . (!empty(l:extra_options) ? ' ' . ale#Escape(l:extra_options) : '')
|
||||
|
0
sources_non_forked/ale/ale_linters/cpp/clazy.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/clazy.vim
Normal file → Executable file
2
sources_non_forked/ale/ale_linters/cpp/cppcheck.vim
Normal file → Executable file
2
sources_non_forked/ale/ale_linters/cpp/cppcheck.vim
Normal file → Executable file
@ -10,7 +10,7 @@ function! ale_linters#cpp#cppcheck#GetCommand(buffer) abort
|
||||
let l:buffer_path_include = empty(l:compile_commands_option)
|
||||
\ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer)
|
||||
\ : ''
|
||||
let l:template = ' --template=''{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}'''
|
||||
let l:template = ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}')
|
||||
|
||||
return l:cd_command
|
||||
\ . '%e -q --language=c++'
|
||||
|
0
sources_non_forked/ale/ale_linters/cpp/cpplint.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/cpplint.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/cquery.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/cquery.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/flawfinder.vim
Normal file → Executable file
0
sources_non_forked/ale/ale_linters/cpp/flawfinder.vim
Normal file → Executable file
Reference in New Issue
Block a user