Discarding analysis in clangd for specific directories inside the project workspace

Which would be the correct way to disable code analysis (specifically clang-tidy) for code found in the two specific directories, for example .build/ and extern/ folders. In the C/C++ extension developed by Microsoft this would typically be enough:

“C_Cpp.codeAnalysis.exclude”: {
“**/.build”: true,
“**/extern”: true

This is my initial attempt but without any success:
PathMatch: [.build/., extern/.]
PathExclude: [.build/., extern/.]