The checkers from the “Microsoft Native Recommended Rules” ruleset already appear in-editor in the form of green squiggles: see in-editor code analysis. C++ Core Guidelines Inspired RuleĪll of these rules are available in Visual Studio. R: Resource management C++ Core Guidelines RuleĪdditionally, C++ Core Check also publishes a few rules that do not directly map to the C++ Core Guidelines. Lifetimes Profile C++ Core Guidelines RuleĬ: Classes and class hierarchy C++ Core Guidelines RuleĬon: Constants and immutability C++ Core Guidelines RuleĬP.con: Concurrency C++ Core Guidelines RuleĮ: Error handling C++ Core Guidelines RuleĮnum: Enumerations C++ Core Guidelines RuleĮS: Expressions and statements C++ Core Guidelines Rule Mapping of C++ Core Guidelines rules to C++ Core Check warnings Type Profile C++ Core Guidelines Rule We are actively expanding the coverage as well as fixing issues raised on the Developer Community page.ġ This excludes rules that are philosophical, code-style based rules, rules marked as “impossible to enforce”, or those that are meant to be interpreted and enforced by each codebase’s maintainers. At the time of writing, C++ Core Check covers 67 rules from the Enforceable Set. The C++ Core Guidelines is an ever-evolving document that currently contains 482 rules, however only 263 of these provide guides that are enforceable by static analysis (Enforceable Set). For a more detailed view into the growth and evolution of C++ Core Check, see the other posts in our blog tagged “CppCoreCheck”. We have added more rules into the existing Type, Bounds, and Lifetimes profiles and have expanded into other areas of the C++ Core Guidelines, which you can see in the tables at the bottom of the post.
The C++ team has been expanding C++ Core Check’s coverage over the last five years. At the time of its release, C++ Core Check offered rules from the Bounds profile and Type profile with the promise of the Lifetimes profile to follow.
This post is to provide a snapshot of the C++ Core Guidelines coverage that C++ Core Check offers.įor background, the C++ team introduced C++ Core Check in December 2015 as part of Visual Studio 2015 Update 1. C++ Core Check is Microsoft’s static analysis tool that enforces the rules from the C++ Core Guidelines, which is maintained by the C++ Foundation.