Description
The clang-tidy check google-build-using-namespace
warns on almost all using namespace x
directives.
There seem to exceptions to this rule, one of which are already part of the check. E.g., for (std) literal namespaces. (clang-tools-extra/clang-tidy/google/UsingNamespaceDirectiveCheck.cpp:31
).
Many libraries/projects have their own literal namespaces or standard libraries where this exception does not work.
They currently either cannot use the check at all or have to litter the code with //NOLINT
comments.
using namespace ::testing
from gtest/gmock also seems to be used frequently.
Suggested solution:
Add an allow-list for which namespaces warnings are omitted.
Similar to
StringLikeClasses
ofperformance-faster-string-find
IgnoredFilesList
of misc-header-include-cycle- Various options of
modernize-use-emplace
I can provide a PR, just wanted to get feedback before putting in the work.