|
@@ -1126,7 +1126,7 @@ bool ValidateObjCClassPrefix(
|
|
|
// to Apple's rules (the checks above implicitly whitelist anything that
|
|
// to Apple's rules (the checks above implicitly whitelist anything that
|
|
|
// doesn't meet these rules).
|
|
// doesn't meet these rules).
|
|
|
if (!ascii_isupper(prefix[0])) {
|
|
if (!ascii_isupper(prefix[0])) {
|
|
|
- std::cerr << std::endl
|
|
|
|
|
|
|
+ std::cerr
|
|
|
<< "protoc:0: warning: Invalid 'option objc_class_prefix = \""
|
|
<< "protoc:0: warning: Invalid 'option objc_class_prefix = \""
|
|
|
<< prefix << "\";' in '" << file->name() << "';"
|
|
<< prefix << "\";' in '" << file->name() << "';"
|
|
|
<< " it should start with a capital letter." << std::endl;
|
|
<< " it should start with a capital letter." << std::endl;
|
|
@@ -1135,7 +1135,7 @@ bool ValidateObjCClassPrefix(
|
|
|
if (prefix.length() < 3) {
|
|
if (prefix.length() < 3) {
|
|
|
// Apple reserves 2 character prefixes for themselves. They do use some
|
|
// Apple reserves 2 character prefixes for themselves. They do use some
|
|
|
// 3 character prefixes, but they haven't updated the rules/docs.
|
|
// 3 character prefixes, but they haven't updated the rules/docs.
|
|
|
- std::cerr << std::endl
|
|
|
|
|
|
|
+ std::cerr
|
|
|
<< "protoc:0: warning: Invalid 'option objc_class_prefix = \""
|
|
<< "protoc:0: warning: Invalid 'option objc_class_prefix = \""
|
|
|
<< prefix << "\";' in '" << file->name() << "';"
|
|
<< prefix << "\";' in '" << file->name() << "';"
|
|
|
<< " Apple recommends they should be at least 3 characters long."
|
|
<< " Apple recommends they should be at least 3 characters long."
|
|
@@ -1159,7 +1159,7 @@ bool ValidateObjCClassPrefix(
|
|
|
// The file does not have a package and ...
|
|
// The file does not have a package and ...
|
|
|
if (other_package_for_prefix.empty()) {
|
|
if (other_package_for_prefix.empty()) {
|
|
|
// ... no other package has declared that prefix.
|
|
// ... no other package has declared that prefix.
|
|
|
- std::cerr << std::endl
|
|
|
|
|
|
|
+ std::cerr
|
|
|
<< "protoc:0: warning: File '" << file->name() << "' has no "
|
|
<< "protoc:0: warning: File '" << file->name() << "' has no "
|
|
|
<< "package. Consider adding a new package to the proto and adding '"
|
|
<< "package. Consider adding a new package to the proto and adding '"
|
|
|
<< "new.package = " << prefix << "' to the expected prefixes file ("
|
|
<< "new.package = " << prefix << "' to the expected prefixes file ("
|
|
@@ -1167,7 +1167,7 @@ bool ValidateObjCClassPrefix(
|
|
|
std::cerr.flush();
|
|
std::cerr.flush();
|
|
|
} else {
|
|
} else {
|
|
|
// ... another package has declared the same prefix.
|
|
// ... another package has declared the same prefix.
|
|
|
- std::cerr << std::endl
|
|
|
|
|
|
|
+ std::cerr
|
|
|
<< "protoc:0: warning: File '" << file->name() << "' has no package "
|
|
<< "protoc:0: warning: File '" << file->name() << "' has no package "
|
|
|
<< "and package '" << other_package_for_prefix << "' already uses '"
|
|
<< "and package '" << other_package_for_prefix << "' already uses '"
|
|
|
<< prefix << "' as its prefix. Consider either adding a new package "
|
|
<< prefix << "' as its prefix. Consider either adding a new package "
|
|
@@ -1196,7 +1196,7 @@ bool ValidateObjCClassPrefix(
|
|
|
// Check: Warning - If the given package/prefix pair wasn't expected, issue a
|
|
// Check: Warning - If the given package/prefix pair wasn't expected, issue a
|
|
|
// warning issue a warning suggesting it gets added to the file.
|
|
// warning issue a warning suggesting it gets added to the file.
|
|
|
if (!expected_package_prefixes.empty()) {
|
|
if (!expected_package_prefixes.empty()) {
|
|
|
- std::cerr << std::endl
|
|
|
|
|
|
|
+ std::cerr
|
|
|
<< "protoc:0: warning: Found unexpected 'option objc_class_prefix = \""
|
|
<< "protoc:0: warning: Found unexpected 'option objc_class_prefix = \""
|
|
|
<< prefix << "\";' in '" << file->name() << "';"
|
|
<< prefix << "\";' in '" << file->name() << "';"
|
|
|
<< " consider adding it to the expected prefixes file ("
|
|
<< " consider adding it to the expected prefixes file ("
|