alexfh added a comment.

In http://reviews.llvm.org/D13313#257476, @aaron.ballman wrote:

> As a slightly more broad question: I think we should have a user-customizable 
> way to categorize these checks so that you can enable/disable them with 
> finer-grained control. Some of the existing checkers already cover the Cpp 
> guidelines, and we'll likely be adding plenty more. There's quite likely 
> overlap with Google and LLVM checkers, etc. It would be really nice if we had 
> a way to say: -checks=-*, CppGuidelines or -checks=-*, CERT, etc.
>
> (I'm not suggesting this as part of this patch, but I think it is an idea we 
> should consider exploring because style guidelines abound: the new C++ ones, 
> MISRA, CERT, joint strike fighter, etc. User-customizable categorization 
> would really help for this sort of thing. This would help assuage my issue 
> with the checker being on by default in misc-* -- it could be off in misc-* 
> but on in cppcoreguidelines-*, for instance.)
>
> ~Aaron


One way we could get CppCoreGuidelines checks available for easy enabling as a 
whole is to create a separate module and register all relevant checks there 
with names relevant to the CppCoreGuidelines (e.g. register the 
`clang::tidy::google::ExplicitConstructorCheck` there as 
"cppcoreguidelines-rc-explicit"). If a checks needs to be slightly modified in 
order to be closer to a specific rule, we might add some check options and 
configure proper defaults in the `CppCoreGuidelinesModule::getModuleOptions()`. 
If a larger change in behavior is needed, we could inherit from existing checks 
as well.


http://reviews.llvm.org/D13313



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to