[cfe-dev] [clang-tidy] Disabling checks for multiple lines
Tobias Klinke via cfe-dev
cfe-dev at lists.llvm.org
Thu Nov 21 10:24:48 PST 2019
Hi,
currently there is no way to disable clang-tidy checks for a whole
section of code inline in a similar way to // NOLINT for a single line.
I found two references where the topic has already been brought up:
- as a side topic in a review: https://reviews.llvm.org/D54757#1317477
- as a Bugzilla entry: https://bugs.llvm.org/show_bug.cgi?id=32222
Has anyone worked on this so far? I am willing to implement the feature
and bring it upstream. Would such a patch be welcome?
For the syntax, I would use the proposed '// BEGINNOLINT // ENDNOLINT'
with optional list of checks to disable/enable. However, I am open to
other proposals.
Background: I'm currently introducing clang-tidy to a large embedded
code base, where there are quite a few sections for which certain checks
do not apply (platform specific, mixing C and C++, generated code etc.).
It would be very convenient if this feature would be available to us.
Regards,
Tobias
More information about the cfe-dev
mailing list