[PATCH] D23848: Add a clang-tidy Visual Studio extension

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 24 14:15:49 PDT 2016


zturner added inline comments.

================
Comment at: clang-tidy-vs/ClangTidy/ClangTidyProperties.cs:82
@@ +81,3 @@
+        public bool CERTDCL50
+        {
+            get { return GetInheritableProperty<bool>("CERTDCL50").Value;  }
----------------
Are the .rst files in the repo somewhere already?  I don't see them.

As for the display name, I agree this one is bad (I forgot to change it).  But you can look at some of the ones below for better examples.  For example, I find `I.22 - Complex Global Initializers` to be a better short descriptor than `cppcoreguidelines-interfaces-global-init`.

What about a hand-maintained Yaml file that adheres to a format similar to the following?

```
---
Checks:
  - Name:        cert-dcl54-cpp
    Label:       Overloaded allocation function pairs
    Description: Checks for violations of CERT DCL54-CPP - Overload allocation and deallocation functions as a pair in the same scope
    Category:    CERT Secure Coding Standards
  - Name:        cppcoreguidelines-interfaces-global-init
    Label:       I.22 - Complex Global Initializers
    Description: Checks for violations of Core Guideline I.22 - Avoid complex initializers of global objects
    Category:    C++ Core Guidelines
...

```

Some file somewhere is going to have to be maintained by hand, and since a file such as this doesn't appear to exist in clang-tidy already, we might as well use a format that we already have good tools to parse at runtime, such as Yaml.


https://reviews.llvm.org/D23848





More information about the cfe-commits mailing list