diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-07-06 12:29:08 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-08-14 13:34:51 -0400 |
commit | 4e43931eaf897d719bc718d5baf1ab84444fdfee (patch) | |
tree | 275ae0622f1a867ecefc34db938c0f27102af039 /src/google/protobuf/compiler/objectivec/objectivec_helpers.h | |
parent | edaefac5d2221ab26b9988fb76c79760c6495fb8 (diff) | |
download | protobuf-4e43931eaf897d719bc718d5baf1ab84444fdfee.tar.gz protobuf-4e43931eaf897d719bc718d5baf1ab84444fdfee.tar.bz2 protobuf-4e43931eaf897d719bc718d5baf1ab84444fdfee.zip |
Add support for a file listing expected package to objc prefixes for validation.
- Add a env var to pass a set of expected prefixes for validation.
- Report warnings/errors based on the expected prefixes vs. the data in the files compiled.
- Use some helpers from common directory.
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/objectivec/objectivec_helpers.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h index 10d51a34..072a2e57 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h @@ -62,9 +62,6 @@ string FileName(const FileDescriptor* file); // declared in the proto package. string FilePath(const FileDescriptor* file); -// Checks the prefix for a given file and outputs any warnings/errors needed. -void ValidateObjCClassPrefix(const FileDescriptor* file); - // Gets the name of the root class we'll generate in the file. This class // is not meant for external consumption, but instead contains helpers that // the rest of the the classes need @@ -145,6 +142,11 @@ string BuildFlagsString(const vector<string>& strings); string BuildCommentsString(const SourceLocation& location); +// Checks the prefix for a given file and outputs any warnings needed, if +// there are flat out errors, then out_error is filled in and the result is +// false. +bool ValidateObjCClassPrefix(const FileDescriptor* file, string *out_error); + // Generate decode data needed for ObjC's GPBDecodeTextFormatName() to transform // the input into the the expected output. class LIBPROTOC_EXPORT TextFormatDecodeData { |