dealing with a large code-base, I’d like to activate clang-tidy, but only for certain subdirectories. Is this possible using either the .clangd config or .clang-tidy? Alternatively, is there a way to manually/on-demand enable clang-tidy for a TU when I decide I want to see the diags?
You can use a .clangd file that looks like:
Diagnostics: ClangTidy: Remove: "*" --- If: PathMatch: my/fancy/subdir/.* Diagnostics: ClangTidy: Add: [modernize-*, readability-*]
perfect - thank you!