added clang-tidy task to overseer
This commit is contained in:
22
lua/overseer/template/user/clang/clang-tidy.lua
Normal file
22
lua/overseer/template/user/clang/clang-tidy.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
name = 'clang-tidy',
|
||||
builder = function()
|
||||
-- Full path to current file (see :help expand())
|
||||
local dir = vim.loop.cwd()
|
||||
local file = vim.fn.expand('%:p')
|
||||
return {
|
||||
cmd = { 'clang-tidy' },
|
||||
-- cmd = { 'c:/Users/uid40528/scoop/apps/llvm/current/bin/clang-tidy.exe' },
|
||||
args = { file, '-p', 'build_nvim', '--quiet', '--config-file', dir .. '/.clang-tidy' },
|
||||
cwd = dir,
|
||||
components = {
|
||||
{ 'on_result_diagnostics_quickfix', open = true },
|
||||
{ 'on_output_parse', problem_matcher = '$gcc' },
|
||||
{ 'on_result_diagnostics' },
|
||||
'default' },
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = { 'cpp' },
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user