I want to include a header from an external project, but clang-tidy is quite unhappy about it and produces a huge list of warnings. To workaround this, I am trying to disable all diagnostics coming from this header.
I tried:
// NOLINTBEGIN
// NOLINTNEXTLINE
#include <bad.hpp> // NOLINT
// NOLINTEND
But this does not work unfortunately.
This email thread suggests to use -header-filter
(HeaderFilterRegex) option.
HeaderFilterRegex: '^((?!bad.hpp).)*$'
But this results into all headers being ignored, since clang tidy uses POSIX regex syntax. Which does not support negative look ahead.
I also considered using line-filter for this as this answer suggests, but there is no such option for the config file.
Is it possible at all?