Question about custom Clang static analyzer checker registration in clang-tidy without using plugin

Hi Artem, there is one more thing that blocks me from making it work in clang-tidy. Clang-tidy relies on AnalyzerOptions::getRegisteredCheckers to get a list of registered checkers so that it can verify the command line arguments. However, it only returns a list of builtin checkers, therefore there is no way for clang-tidy to recognize the custom checker from command line. What's the best way to change it to return all registered checkers?

I looked into the code and I don't find a straightforward way. ClangCheckerRegistry, which is the place where all plugin loading happens, is a hidden implementation detail of CheckerRegistration.cpp. So I can only think of exposing a function in CheckerRegistration.h and removing AnalyzerOptions::getRegisteredCheckers. Do you have some other idea on this?