- Do not analyze header files, since we don't want to promote using anonymous namespaces there.
- Do not warn about const/constexpr variables, those are implicitly static in C++ and they don't need to be moved to an anonymous namespace. Warning about redundant static in general could be implemented as a standalone check, moving away some of the functionality from this check.
The logic would fall apart when run in clangd or unity builds. The safest way is generally to match the file extension, we have a class for it in clang-tidy/utils