[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

Congcong Cai via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 13 00:21:46 PDT 2025


HerrCai0907 wrote:

> This feature request requires adding _a lot_ of things in the config file. And once it's in, people will want _more_ things in it (eventually they will want exactly the same functionality as can be achieved by regular checks). So I see this feature growing without possibility of refactoring and cleaning, which can add a lot of complexity and maintenance work.

There are 2 kinds of stability here:
1. config stability: I think we only need to keep several key config fields (name, query, diagnostic) stable and make the other config optional. 
2. query stability: We only parse query string in check, so when outdated / invalid query in third party, user can avoid issue by disabling the custom check and will not harm the whole clang-tidy.

https://github.com/llvm/llvm-project/pull/131804


More information about the cfe-commits mailing list