mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 06:49:01 +00:00
vim-patch:84baba3: runtime(compiler): do not override &l:makeprg on :compiler! (#36470)
closes: vim/vim#18686
84baba329a
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
" vim compiler file
|
||||
" Compiler: cppcheck (C++ static checker)
|
||||
" Maintainer: Vincent B. (twinside@free.fr)
|
||||
" Last Change: 2024 Nov 19 by @Konfekt
|
||||
" Last Change: 2025 Nov 06 by @Konfekt
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "cppcheck"
|
||||
@@ -18,14 +18,14 @@ if !exists('g:c_cppcheck_params')
|
||||
let s:undo_compiler = 'unlet! g:c_cppcheck_params'
|
||||
endif
|
||||
|
||||
let &l:makeprg = 'cppcheck --quiet'
|
||||
exe 'CompilerSet makeprg=' .. escape('cppcheck --quiet'
|
||||
\ ..' --template="{file}:{line}:{column}: {severity}: [{id}] {message} {callstack}"'
|
||||
\ ..' '..get(b:, 'c_cppcheck_params', get(g:, 'c_cppcheck_params', (&filetype ==# 'cpp' ? ' --language=c++' : '')))
|
||||
\ ..' '..get(b:, 'c_cppcheck_includes', get(g:, 'c_cppcheck_includes',
|
||||
\ (filereadable('compile_commands.json') ? '--project=compile_commands.json' :
|
||||
\ (!empty(glob('*'..s:slash..'compile_commands.json', 1, 1)) ? '--project='..glob('*'..s:slash..'compile_commands.json', 1, 1)[0] :
|
||||
\ (empty(&path) ? '' : '-I')..join(map(filter(split(&path, ','), 'isdirectory(v:val)'),'shellescape(v:val)'), ' -I')))))
|
||||
exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
|
||||
\ (empty(&path) ? '' : '-I')..join(map(filter(split(&path, ','), 'isdirectory(v:val)'),'shellescape(v:val)'), ' -I'))))),
|
||||
\ ' \|"')
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%f:%l:%c:\ %tarning:\ %m,
|
||||
|
||||
Reference in New Issue
Block a user