I have a simple c++ project with Bazel. I'm running some simple tests using the Google Test framework. Clang-tidy seems to complain about almost every single macro from that framework. Is there a way to get clang to ignore those macros? I tried using //NOLINT but it doesn't seem to do anything.
My clang-tidy config file is this:
Checks: '-*,clang-analyzer-*,
modernize-avoid-bind,
modernize-avoid-c-arrays,
modernize-concat-nested-namespaces,
modernize-deprecated-headers,
modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-replace-random-shuffle,
modernize-return-braced-init-list,
modernize-shrink-to-fit,
modernize-unary-static-assert,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-default-member-init,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-nodiscard,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
modernize-use-transparent-functors,
modernize-use-uncaught-exceptions,
modernize-use-using,
performance-*,readability*,cppcoreguidelines-*, llvm-*,
google-*,
bugprone-*'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
CheckOptions:
[{key: readability-identifier-naming.ClassCase, value: CamelCase},
{key: readability-identifier-naming.ClassMemberCase, value: lower_case},
{key: readability-identifier-naming.PrivateMemberPrefix, value: m_},
{key: readability-identifier-naming.ClassMethodCase, value: lower_case},
{key: readability-identifier-naming.StructCase, value: lower_case},
{key: readability-identifier-naming.VariableCase, value: lower_case},
{key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE},
]
The warning that I get is
Initializing non-owner argument of type 'testing::internal::TestFactoryBase *' with a newly created 'gsl::owner<>'clang-tidy(cppcoreguidelines-owning-memory)