fix(nvim): duplication of errors in clangtidy from nvim-lint

This commit is contained in:
Kyren223
2024-08-06 22:15:30 +03:00
parent ae045c4993
commit b01d5d37f0

View File

@@ -26,7 +26,14 @@ return {
lint.linters.clangtidy.parser = function(output, bufnr, linter_cwd)
local diagnostics = clangtidy_parser(output, bufnr, linter_cwd)
diagnostics = vim.tbl_filter(function(diagnostic)
return diagnostic.severity ~= vim.diagnostic.severity.WARN
if diagnostic.severity == vim.diagnostic.severity.WARN then
return false
end
if diagnostic.severity == vim.diagnostic.severity.ERROR then
return false
end
return true
end, diagnostics)
return diagnostics
end