[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 1 06:46:01 PDT 2019


MyDeveloperDay added a comment.

In D59932#1446533 <https://reviews.llvm.org/D59932#1446533>, @JonasToth wrote:

> I think the idea is good and implementation, too. If we iterate all checks anyway (probably?) we could think about adding a severity to the checks, too?


In a similar vein, I often feel like I'd like to be able to define a AllowFixIt on every checker, so I could turn off the FixIts for things we just want to warn on.

I often run clang-tidy with `-fix` but I don't want to necessarily want clang-tidy to fix everything I have marked as -check. readability-identifier-naming is one such checker that isn't mature enough to get everything correct, I want to see the warning to prevent new violations from creeping in, but don't actually want it to do a fixit.

However I don't want to have to keep commenting the check out of my .clang-tidy file just so I can run with -fix, it would be great if we could add   *.AllowFixIt

i.e.

  - key:             <checkername>-naming.AllowFixIt
    value:           'true/false'

To allow us to disable FixIts for certain checkers

  - key:             readability-identifier-naming.AllowFixIt
    value:           'false'

Just and idea, sorry for hijacking the thread.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59932/new/

https://reviews.llvm.org/D59932





More information about the cfe-commits mailing list