[cfe-dev] [clang-tidy][RFC] Proposal: enable globbing in NOLINT expressions
Carlos Galvez via cfe-dev
cfe-dev at lists.llvm.org
Tue Oct 5 06:40:07 PDT 2021
Hi,
Currently it's annoying or sometimes impossible (due to line length limit)
to accurately inline-suppress clang-tidy warnings. For example:
//
NOLINT(cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes)
This is not an uncommon case of someone enabling both a "coding guideline"
module and "best practices" module.
The solution turns into a very bad practice, which is disabling *all* warnings,
potentially hiding additional bugs:
// NOLINT
Proposal: support globbing for NOLINT expressions, with the same
format/semantics as when enabling/disabling checks:
// NOLINT(*-non-private-member-variables-in-classes)
What do you think?
/Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211005/0fb7a9c6/attachment.html>
More information about the cfe-dev
mailing list