added clang-tidy task to overseer

This commit is contained in:
Hartmann
2024-04-11 10:14:24 +02:00
parent 1b764b9f0e
commit efd30083a8
2 changed files with 38 additions and 2 deletions

View 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' },
},
}