4 ms·
It would be great to see such elaborate guidelines to be accompanied with an integration into a linting tool, such as clang-tidy.
by mavam 10y ago
It would be great to see such elaborate guidelines to be accompanied with an integration into a linting tool, such as clang-tidy.
- EliRivers 10y agoThere are integrations of this and various other coding standards into some commercial tools; I don't recall seeing them in any free tools yet.
- BudVVeezer 10y agoSome of these rules are currently in clang-tidy, but the coverage is by no means comprehensive. Patches always welcome. :-)
- hermitdev 10y agoI thought there was a checker (based on clang) included by the CPP Core Guidelines [0], but I'm not seeing it there currently. Must have been external. I know I saw a tool that provided partial support, at least for GSL [1] (MS's library support of the the CPP Core Guidelines). [0] https://github.com/isocpp/CppCoreGuidelines https://github.com/isocpp/CppCoreGuidelines [1] https://github.com/microsoft/gsl/ https://github.com/microsoft/gsl/
- geokon 10y agoMaybe I'm misunderstanding your reply, but the GSL is the checker. It adds header constructs that create compile time errors based on bad practices. The whole point is that there is no need for an external tool.
- stinos 10y agothe GSL is the checker Well it's a bunch of headers declaring useful types and functions. If you don't use them the compiler won't complain and nothing is checked. I think the OP means something like static analysis. I found a note in my C++14/17 TODO list where I typed 'clang-tidy might be able to give warnings for pre-c++14 constructs etc, see https://reviews.llvm.org/diffusion/L/browse/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/' https://reviews.llvm.org/diffusion/L/browse/clang-tools-extr.... Don't have time now to figure out what that is, but it's probably what the OP is after.
- BudVVeezer 10y agoThe clang-tidy tool has some C++ Core Guideline checks under the cppcoreguidelines module.