Currently clang-tidy doesn't provide a practical way to suppress diagnostics from headers you don't have control over. If using a function defined in such header causes a false positive, there is no easy way to deal with this issue.
Since you cannot modify a header, you cannot add NOLINT (or any other source annotations) to it. And adding NOLINT to each invocation of such function is either impossible or hugely impractical if invocations are ubiquitous.
Using the '-header-filter' doesn't help to address this issue as well. Unless your own headers are strategically named, it is virtually impossible to craft a regex that will filter out only the third-party ones.
The '-line-filter' can be used to suppress such warnings, but it's not very convenient. Instead of excluding a line that produces a warning you have to include all other lines. Plus, it provides no way to suppress only certain warnings from a file.
The option I propose solves aforementioned problems. It allows a user to specify a set of regular expressions to suppress diagnostics from files whose names match these expressions. Additionally, a set of checks can be specified to suppress only certain diagnostics.
The option can be used in the following way:
clang-tidy -suppress-checks-filter='[{"name":"falty_header.h"},{"name":"third-party/","checks":"google-explicit-constructor"}]' source.cpp -- -c