Suppress dot-delimiter warning if ruby_package consists of a single component (#7276)

This commit is contained in:
Masaki Hara 2021-10-16 12:11:59 +09:00 committed by GitHub
parent 62d59d7d4c
commit d08bc71c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -421,7 +421,7 @@ int GeneratePackageModules(const FileDescriptor* file, io::Printer* printer) {
// -> A.B.C // -> A.B.C
if (package_name.find("::") != std::string::npos) { if (package_name.find("::") != std::string::npos) {
need_change_to_module = false; need_change_to_module = false;
} else { } else if (package_name.find(".") != std::string::npos) {
GOOGLE_LOG(WARNING) << "ruby_package option should be in the form of:" GOOGLE_LOG(WARNING) << "ruby_package option should be in the form of:"
<< " 'A::B::C' and not 'A.B.C'"; << " 'A::B::C' and not 'A.B.C'";
} }