[cfe-dev] [clang-tidy] Disable individual checks

Alexander Kornienko via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 7 08:06:32 PDT 2015

As described in the documentation (
http://clang.llvm.org/extra/clang-tidy/index.html, also clang-tidy -help),
you can use the "Checks" option in the .clang-tidy file to disable or
enable any set of checks. E.g. to
disable clang-analyzer-cplusplus.NewDelete you can use a .clang-tidy file
with this line:

Checks: "-clang-analyzer-cplusplus.NewDelete"

It will instruct clang-tidy to use the default set of checks with that
specific check disabled.

-- Alex

On Fri, Sep 4, 2015 at 11:07 PM, Paul Hoad via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> cfe-dev's
> I have an example where I think [clang-analyzer-cplusplus.NewDelete] is
> reporting a false positive.
> While I would like to prove that point, I need to spend some time making a
> much smaller reproducible test case
> In the meantime, Is it possible for me to disable an individual rule via
> the .clang-tidy file without disabling them all and then re-enabling all
> but the one I want?
> Paul
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150907/6c5c3364/attachment.html>

More information about the cfe-dev mailing list