[cfe-dev] [clang-tidy] Excluding individual files/lines from clang-tidy checks

Richard via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 3 13:58:37 PDT 2016


[Please reply *only* to the list and do not include my email directly
in the To: or Cc: of your reply; otherwise I will not see your reply.
Thanks.]

In article <A04C45C0-2B94-4584-9661-4B2E39CA65D4 at apple.com>,
    Mehdi Amini via cfe-dev <cfe-dev at lists.llvm.org> writes:

> That causes some maintainability issues though: let say I filter something
> between line 1000 and 1005 today, what if some code is later added before?

This is why with static analysis tools most people prefer marking
exceptions with a comment that follows the code around instead of
specifying a fragile file/line combination on the command line or in
a configuration file.

> Do you see a way of handling this?

Either use some sort of source annotation like the comment above or
identify the chunk of code with some sort of universal address that
drills down by some combination of name and block identifiers.  Even
those such addresses can change under maintenance, however.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
            The Terminals Wiki <http://terminals-wiki.org>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>



More information about the cfe-dev mailing list