[cfe-dev] [clang-tidy] Excluding individual files/lines from clang-tidy checks
Nikita via cfe-dev
cfe-dev at lists.llvm.org
Thu Nov 24 08:37:15 PST 2016
I've submitted a patch adding this functionality a couple of weeks ago
- https://reviews.llvm.org/D26418
But the review is stuck - @alexfh hasn't been online for two weeks.
Could someone please review this patch?
Regards,
Nikita
On Fri, Nov 4, 2016 at 1:41 AM, Nikita <nikita.kakuev at gmail.com> wrote:
> By the way, with line ranges omitted it is easier to ditch JSON and go
> for a simpler format.
> Like this: 'header1.h:cert-*,boost-*;header2.h:clang-analyzer-*'.
> Less cumbersome, more comfortable to work with in, say, CMake files.
>
> On Fri, Nov 4, 2016 at 12:10 AM, Nikita <nikita.kakuev at gmail.com> wrote:
>>> use some sort of source annotation
>> This approach works well for sources I have control over. But trying
>> to apply it to third-party headers will result in a significant
>> maintenance burden.
>>
>> The option I propose targets third-party headers specifically. The
>> goal is to be able to exclude certain third-party headers from checks
>> and thus avoid maintaining patches with source annotations.
>>
>> On Thu, Nov 3, 2016 at 11:58 PM, Richard via cfe-dev
>> <cfe-dev at lists.llvm.org> wrote:
>>>
>>> [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>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list