From e2cc2de304f8bc33b91ab18fa0b7cef8aaf26c8b Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 10 Aug 2020 19:08:25 +0100 Subject: [PATCH] Fix lots of spelling errors (#7751) * Fix a typo * Fix lots of spelling errors * Fix a few more spelling mistakes * s/parsable/parseable/ * Don't touch the third party files * Cloneable is the preferred C# term * Copyable is the preferred C++ term * Revert "s/parsable/parseable/" This reverts commit 534ecf7675222f39d98928c7e1489b56b004b774. * Revert unparseable->unparsable corrections --- .gitignore | 2 +- benchmarks/README.md | 2 +- benchmarks/js/js_benchmark.js | 12 ++++---- .../protobuf.js/protobufjs_benchmark.js | 12 ++++---- cmake/CMakeLists.txt | 2 +- cmake/protobuf-options.cmake | 4 +-- conformance/conformance.proto | 4 +-- conformance/third_party/jsoncpp/json.h | 6 ++-- conformance/third_party/jsoncpp/jsoncpp.cpp | 2 +- csharp/src/AddressBook/Program.cs | 2 +- .../Conformance.cs | 4 +-- .../Buffers/ArrayBufferWriter.cs | 2 +- csharp/src/Google.Protobuf.Test/IssuesTest.cs | 2 +- csharp/src/Google.Protobuf/ByteString.cs | 2 +- .../src/Google.Protobuf/CodedInputStream.cs | 2 +- .../Reflection/OneofAccessor.cs | 2 +- .../src/Google.Protobuf/WellKnownTypes/Api.cs | 2 +- docs/csharp/proto2.md | 2 +- docs/field_presence.md | 2 +- docs/implementing_proto3_presence.md | 2 +- java/README.md | 2 +- .../proto/google/protobuf/descriptor.proto | 2 +- .../proto/google/protobuf/descriptor.proto | 2 +- .../com/google/protobuf/ArrayDecoders.java | 4 +-- .../java/com/google/protobuf/Descriptors.java | 2 +- .../google/protobuf/GeneratedMessageLite.java | 2 +- .../com/google/protobuf/MapEntryLite.java | 2 +- js/binary/utils.js | 2 +- js/experimental/runtime/kernel/kernel_test.js | 28 +++++++++---------- js/experimental/runtime/kernel/tag_test.js | 4 +-- kokoro/release/collect_all_artifacts.sh | 2 +- objectivec/DevTools/compile_testing_protos.sh | 2 +- objectivec/DevTools/full_mac_build.sh | 2 +- objectivec/DevTools/pddm.py | 2 +- objectivec/GPBApi.pbobjc.h | 2 +- objectivec/GPBExtensionInternals.m | 4 +-- objectivec/GPBMessage.m | 2 +- objectivec/GPBUtilities.m | 2 +- objectivec/GPBUtilities_PackagePrivate.h | 2 +- objectivec/README.md | 2 +- objectivec/Tests/CocoaPods/run_tests.sh | 2 +- objectivec/Tests/GPBCodedInputStreamTests.m | 2 +- objectivec/Tests/GPBCodedOuputStreamTests.m | 2 +- php/ext/google/protobuf/php-upb.h | 4 +-- php/src/Google/Protobuf/Mixin.php | 2 +- php/tests/descriptors_test.php | 2 +- php/tests/test.sh | 2 +- python/README.md | 2 +- .../proto/google/protobuf/descriptor.proto | 2 +- python/google/protobuf/descriptor.py | 4 +-- python/google/protobuf/descriptor_database.py | 2 +- .../protobuf/internal/json_format_test.py | 2 +- .../google/protobuf/internal/message_test.py | 2 +- .../protobuf/internal/reflection_test.py | 4 +-- .../protobuf/internal/well_known_types.py | 2 +- .../protobuf/pyext/scoped_pyobject_ptr.h | 2 +- ruby/ext/google/protobuf_c/upb.h | 4 +-- src/google/protobuf/api.proto | 2 +- src/google/protobuf/arena_test_util.h | 2 +- .../compiler/command_line_interface.h | 2 +- .../protobuf/compiler/cpp/cpp_message.h | 2 +- .../protobuf/compiler/importer_unittest.cc | 4 +-- .../protobuf/compiler/java/java_enum_field.cc | 2 +- .../compiler/java/java_message_field.cc | 2 +- .../compiler/java/java_primitive_field.cc | 2 +- .../compiler/java/java_string_field.cc | 2 +- .../protobuf/compiler/js/js_generator.h | 4 +-- .../compiler/objectivec/objectivec_file.cc | 2 +- .../objectivec/objectivec_generator.cc | 2 +- .../compiler/python/python_generator.cc | 2 +- .../protobuf/compiler/ruby/ruby_generator.cc | 2 +- src/google/protobuf/descriptor.cc | 2 +- src/google/protobuf/descriptor_unittest.cc | 2 +- .../protobuf/generated_message_table_driven.h | 2 +- src/google/protobuf/io/coded_stream.h | 4 +-- .../protobuf/io/zero_copy_stream_unittest.cc | 2 +- src/google/protobuf/map.h | 2 +- src/google/protobuf/map_field.h | 4 +-- src/google/protobuf/map_field_lite.h | 2 +- src/google/protobuf/map_test.cc | 2 +- src/google/protobuf/message.h | 2 +- src/google/protobuf/parse_context.cc | 2 +- src/google/protobuf/stubs/casts.h | 2 +- src/google/protobuf/stubs/common.cc | 2 +- src/google/protobuf/stubs/time_test.cc | 2 +- src/google/protobuf/text_format_unittest.cc | 4 +-- src/google/protobuf/util/field_mask_util.cc | 6 ++-- src/google/protobuf/util/internal/constants.h | 2 +- .../util/internal/json_objectwriter.h | 2 +- .../util/internal/json_stream_parser_test.cc | 2 +- .../util/internal/type_info_test_helper.h | 2 +- src/google/protobuf/util/internal/utility.h | 2 +- .../protobuf/util/message_differencer.cc | 2 +- .../protobuf/util/message_differencer.h | 2 +- 94 files changed, 136 insertions(+), 136 deletions(-) diff --git a/.gitignore b/.gitignore index a7349c2aa8..3dd7e3f382 100644 --- a/.gitignore +++ b/.gitignore @@ -104,7 +104,7 @@ build_msvc # needed to trigger "pod install" to rerun the preinstall commands. Pods/ -# Comformance test output +# Conformance test output conformance/.libs/ conformance/com/ conformance/conformance-cpp diff --git a/benchmarks/README.md b/benchmarks/README.md index 436c148a34..76788175c6 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -135,7 +135,7 @@ $ make go ### PHP -We have two version of php protobuf implemention: pure php, php with c extension. To run these version benchmark, you need to: +We have two version of php protobuf implementation: pure php, php with c extension. To run these version benchmark, you need to: #### Pure PHP ``` $ make php diff --git a/benchmarks/js/js_benchmark.js b/benchmarks/js/js_benchmark.js index c44fee01c3..9ba4828969 100644 --- a/benchmarks/js/js_benchmark.js +++ b/benchmarks/js/js_benchmark.js @@ -41,9 +41,9 @@ process.argv.forEach(function(filename, index) { totalBytes += onePayload.length; }); - var senarios = benchmarkSuite.newBenchmark( + var scenarios = benchmarkSuite.newBenchmark( benchmarkDataset.getMessageName(), filename, "js"); - senarios.suite + scenarios.suite .add("js deserialize", function() { benchmarkDataset.getPayloadList().forEach(function(onePayload) { var protoType = getNewPrototype(benchmarkDataset.getMessageName()); @@ -61,15 +61,15 @@ process.argv.forEach(function(filename, index) { results.push({ filename: filename, benchmarks: { - protobufjs_decoding: senarios.benches[0] * totalBytes / 1024 / 1024, - protobufjs_encoding: senarios.benches[1] * totalBytes / 1024 / 1024 + protobufjs_decoding: scenarios.benches[0] * totalBytes / 1024 / 1024, + protobufjs_encoding: scenarios.benches[1] * totalBytes / 1024 / 1024 } }) console.log("Throughput for deserialize: " - + senarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" ); + + scenarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" ); console.log("Throughput for serialize: " - + senarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" ); + + scenarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" ); console.log(""); }); console.log("#####################################################"); diff --git a/benchmarks/protobuf.js/protobufjs_benchmark.js b/benchmarks/protobuf.js/protobufjs_benchmark.js index 19e54972b8..e062d1c6b8 100644 --- a/benchmarks/protobuf.js/protobufjs_benchmark.js +++ b/benchmarks/protobuf.js/protobufjs_benchmark.js @@ -31,9 +31,9 @@ process.argv.forEach(function(filename, index) { totalBytes += onePayload.length; }); - var senarios = benchmarkSuite.newBenchmark( + var scenarios = benchmarkSuite.newBenchmark( benchmarkDataset.messageName, filename, "protobufjs"); - senarios.suite + scenarios.suite .add("protobuf.js static decoding", function() { benchmarkDataset.payload.forEach(function(onePayload) { var protoType = getNewPrototype(benchmarkDataset.messageName); @@ -51,15 +51,15 @@ process.argv.forEach(function(filename, index) { results.push({ filename: filename, benchmarks: { - protobufjs_decoding: senarios.benches[0] * totalBytes, - protobufjs_encoding: senarios.benches[1] * totalBytes + protobufjs_decoding: scenarios.benches[0] * totalBytes, + protobufjs_encoding: scenarios.benches[1] * totalBytes } }) console.log("Throughput for decoding: " - + senarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" ); + + scenarios.benches[0] * totalBytes / 1024 / 1024 + "MB/s" ); console.log("Throughput for encoding: " - + senarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" ); + + scenarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" ); console.log(""); }); console.log("#####################################################"); diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 9ca31ac0bf..65364116a7 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -29,7 +29,7 @@ else() endif() # The Intel compiler isn't able to deal with noinline member functions of -# template classses defined in headers. As such it spams the output with +# template classes defined in headers. As such it spams the output with # warning #2196: routine is both "inline" and "noinline" # This silences that warning. if (CMAKE_CXX_COMPILER_ID MATCHES Intel) diff --git a/cmake/protobuf-options.cmake b/cmake/protobuf-options.cmake index 47fb158257..93ec898e4a 100644 --- a/cmake/protobuf-options.cmake +++ b/cmake/protobuf-options.cmake @@ -2,6 +2,6 @@ option(protobuf_VERBOSE "Enable for verbose output" OFF) mark_as_advanced(protobuf_VERBOSE) -# FindProtobuf module compatibel -option(protobuf_MODULE_COMPATIBLE "CMake build-in FindProtobuf.cmake module compatible" OFF) +# FindProtobuf module compatible +option(protobuf_MODULE_COMPATIBLE "CMake built-in FindProtobuf.cmake module compatible" OFF) mark_as_advanced(protobuf_MODULE_COMPATIBLE) diff --git a/conformance/conformance.proto b/conformance/conformance.proto index 26c0bd26f3..49608b38f4 100644 --- a/conformance/conformance.proto +++ b/conformance/conformance.proto @@ -64,7 +64,7 @@ enum TestCategory { BINARY_TEST = 1; // Test binary wire format. JSON_TEST = 2; // Test json wire format. // Similar to JSON_TEST. However, during parsing json, testee should ignore - // unknown fields. This feature is optional. Each implementation can descide + // unknown fields. This feature is optional. Each implementation can decide // whether to support it. See // https://developers.google.com/protocol-buffers/docs/proto3#json_options // for more detail. @@ -113,7 +113,7 @@ message ConformanceRequest { string message_type = 4; // Each test is given a specific test category. Some category may need - // spedific support in testee programs. Refer to the definition of TestCategory + // specific support in testee programs. Refer to the definition of TestCategory // for more information. TestCategory test_category = 5; diff --git a/conformance/third_party/jsoncpp/json.h b/conformance/third_party/jsoncpp/json.h index 5639c92451..373ec98bde 100644 --- a/conformance/third_party/jsoncpp/json.h +++ b/conformance/third_party/jsoncpp/json.h @@ -1371,7 +1371,7 @@ public: */ std::string getFormattedErrorMessages() const; - /** \brief Returns a vector of structured errors encounted while parsing. + /** \brief Returns a vector of structured errors encountered while parsing. * \return A (possibly empty) vector of StructuredError objects. Currently * only one error can be returned, but the caller should tolerate * multiple @@ -1867,7 +1867,7 @@ private: * - otherwise, it the values do not fit on one line, or the array contains * object or non empty array, then print one value per line. * - * If the Value have comments then they are outputed according to their + * If the Value have comments then they are outputted according to their *#CommentPlacement. * * \sa Reader, Value, Value::setComment() @@ -1928,7 +1928,7 @@ private: * - otherwise, it the values do not fit on one line, or the array contains * object or non empty array, then print one value per line. * - * If the Value have comments then they are outputed according to their + * If the Value have comments then they are outputted according to their #CommentPlacement. * * \param indentation Each level will be indented by this amount extra. diff --git a/conformance/third_party/jsoncpp/jsoncpp.cpp b/conformance/third_party/jsoncpp/jsoncpp.cpp index d313d0563c..78919eac0f 100644 --- a/conformance/third_party/jsoncpp/jsoncpp.cpp +++ b/conformance/third_party/jsoncpp/jsoncpp.cpp @@ -142,7 +142,7 @@ enum { typedef char UIntToStringBuffer[uintToStringBufferSize]; /** Converts an unsigned integer to string. - * @param value Unsigned interger to convert to string + * @param value Unsigned integer to convert to string * @param current Input/Output string buffer. * Must have at least uintToStringBufferSize chars free. */ diff --git a/csharp/src/AddressBook/Program.cs b/csharp/src/AddressBook/Program.cs index ff7b9c085e..de4867a0ce 100644 --- a/csharp/src/AddressBook/Program.cs +++ b/csharp/src/AddressBook/Program.cs @@ -37,7 +37,7 @@ namespace Google.Protobuf.Examples.AddressBook /// /// Entry point. Repeatedly prompts user for an action to take, delegating actual behaviour /// to individual actions. Each action has its own Main method, so that it can be used as an - /// invidual complete program. + /// individual complete program. /// internal class Program { diff --git a/csharp/src/Google.Protobuf.Conformance/Conformance.cs b/csharp/src/Google.Protobuf.Conformance/Conformance.cs index f26d181a98..06b61ea8bd 100644 --- a/csharp/src/Google.Protobuf.Conformance/Conformance.cs +++ b/csharp/src/Google.Protobuf.Conformance/Conformance.cs @@ -82,7 +82,7 @@ namespace Conformance { [pbr::OriginalName("JSON_TEST")] JsonTest = 2, /// /// Similar to JSON_TEST. However, during parsing json, testee should ignore - /// unknown fields. This feature is optional. Each implementation can descide + /// unknown fields. This feature is optional. Each implementation can decide /// whether to support it. See /// https://developers.google.com/protocol-buffers/docs/proto3#json_options /// for more detail. @@ -414,7 +414,7 @@ namespace Conformance { private global::Conformance.TestCategory testCategory_ = global::Conformance.TestCategory.UnspecifiedTest; /// /// Each test is given a specific test category. Some category may need - /// spedific support in testee programs. Refer to the definition of TestCategory + /// specific support in testee programs. Refer to the definition of TestCategory /// for more information. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/csharp/src/Google.Protobuf.Test/Buffers/ArrayBufferWriter.cs b/csharp/src/Google.Protobuf.Test/Buffers/ArrayBufferWriter.cs index 8e42d13dab..5b9913b290 100644 --- a/csharp/src/Google.Protobuf.Test/Buffers/ArrayBufferWriter.cs +++ b/csharp/src/Google.Protobuf.Test/Buffers/ArrayBufferWriter.cs @@ -60,7 +60,7 @@ namespace Google.Protobuf.Buffers } /// - /// Userful for testing writing to buffer writer with a lot of small segments. + /// Useful for testing writing to buffer writer with a lot of small segments. /// If set, it limits the max number of bytes by which the buffer grows by at once. /// public int? MaxGrowBy { get; set; } diff --git a/csharp/src/Google.Protobuf.Test/IssuesTest.cs b/csharp/src/Google.Protobuf.Test/IssuesTest.cs index 941bce0160..2904c461df 100644 --- a/csharp/src/Google.Protobuf.Test/IssuesTest.cs +++ b/csharp/src/Google.Protobuf.Test/IssuesTest.cs @@ -108,7 +108,7 @@ namespace Google.Protobuf // we still must read the tag correctly, even though the tag is at the very end of our limited input // (which is a corner case and will most likely result in an error when trying to read value of the field - // decribed by this tag, but it would be a logical error not to read the tag that's actually present). + // described by this tag, but it would be a logical error not to read the tag that's actually present). // See https://github.com/protocolbuffers/protobuf/pull/7289 cis.AssertNextTag(WireFormat.MakeTag(11, WireFormat.WireType.Varint)); } diff --git a/csharp/src/Google.Protobuf/ByteString.cs b/csharp/src/Google.Protobuf/ByteString.cs index 74dc865e9d..2a52ae58be 100644 --- a/csharp/src/Google.Protobuf/ByteString.cs +++ b/csharp/src/Google.Protobuf/ByteString.cs @@ -269,7 +269,7 @@ namespace Google.Protobuf } /// - /// Retuns the byte at the given index. + /// Returns the byte at the given index. /// public byte this[int index] { diff --git a/csharp/src/Google.Protobuf/CodedInputStream.cs b/csharp/src/Google.Protobuf/CodedInputStream.cs index 4050cbec8c..b09f96ce28 100644 --- a/csharp/src/Google.Protobuf/CodedInputStream.cs +++ b/csharp/src/Google.Protobuf/CodedInputStream.cs @@ -652,7 +652,7 @@ namespace Google.Protobuf /// /// Called when buffer is empty to read more bytes from the - /// input. If is true, RefillBuffer() gurantees that + /// input. If is true, RefillBuffer() guarantees that /// either there will be at least one byte in the buffer when it returns /// or it will throw an exception. If is false, /// RefillBuffer() returns false if no more bytes were available. diff --git a/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs b/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs index 4e040c17ea..7523426dc5 100644 --- a/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs @@ -63,7 +63,7 @@ namespace Google.Protobuf.Reflection internal static OneofAccessor ForSyntheticOneof(OneofDescriptor descriptor) { // Note: descriptor.Fields will be null when this method is called, because we haven't - // cross-linked yet. But by the time the delgates are called by user code, all will be + // cross-linked yet. But by the time the delegates are called by user code, all will be // well. (That's why we capture the descriptor itself rather than a field.) return new OneofAccessor(descriptor, message => descriptor.Fields[0].Accessor.HasValue(message) ? descriptor.Fields[0].FieldNumber : 0, diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs index 6bc0821fa5..a323a56627 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs @@ -918,7 +918,7 @@ namespace Google.Protobuf.WellKnownTypes { /// The mixin construct implies that all methods in `AccessControl` are /// also declared with same name and request/response types in /// `Storage`. A documentation generator or annotation processor will - /// see the effective `Storage.GetAcl` method after inherting + /// see the effective `Storage.GetAcl` method after inheriting /// documentation and annotations as follows: /// /// service Storage { diff --git a/docs/csharp/proto2.md b/docs/csharp/proto2.md index 0d9159de73..53fc43c7eb 100644 --- a/docs/csharp/proto2.md +++ b/docs/csharp/proto2.md @@ -97,7 +97,7 @@ foo.GetOrInitializeExtension(RepeatedFooExt).Add(new Baz()); ### Message initialization -Initialization refers to checking the status of required fields in a proto2 message. If a message is uninitialized, not all required fields are set in either the message itself or any of its submessages. In other languages, missing required fields throw errors depending on the merge method used. This could cause unforseen errors at runtime if the incorrect method is used. +Initialization refers to checking the status of required fields in a proto2 message. If a message is uninitialized, not all required fields are set in either the message itself or any of its submessages. In other languages, missing required fields throw errors depending on the merge method used. This could cause unforeseen errors at runtime if the incorrect method is used. However, in this implementation, parsers and input streams don't check messages for initialization on their own and throw errors. Instead it's up to you to handle messages with missing required fields in whatever way you see fit. Checking message initialization can be done manually via the `IsInitialized` extension method in `MessageExtensions`. diff --git a/docs/field_presence.md b/docs/field_presence.md index 4ce778552b..dc16292c85 100644 --- a/docs/field_presence.md +++ b/docs/field_presence.md @@ -127,7 +127,7 @@ The _no presence_ serialization discipline results in visible differences from t ### Considerations for merging -Under the _no presence_ rules, it is effectively impossible for a target field to merge-from its default value (using the protobuf's API merging functions). This is because default values are skipped, simliar to the _no presence_ serialization discipline. Merging only updates the target (merged-to) message using the non-skipped values from the update (merged-from) message. +Under the _no presence_ rules, it is effectively impossible for a target field to merge-from its default value (using the protobuf's API merging functions). This is because default values are skipped, similar to the _no presence_ serialization discipline. Merging only updates the target (merged-to) message using the non-skipped values from the update (merged-from) message. The difference in merging behavior has further implications for protocols which rely on partial "patch" updates. If field presence is not tracked, then an update patch alone cannot represent an update to the default value, because only non-default values are merged-from. diff --git a/docs/implementing_proto3_presence.md b/docs/implementing_proto3_presence.md index fae2eb589a..73f21a3829 100644 --- a/docs/implementing_proto3_presence.md +++ b/docs/implementing_proto3_presence.md @@ -13,7 +13,7 @@ optional fields. First-party code generators developed by Google are being updated already. However third-party code generators will need to be updated independently by their authors. This includes: -- implementations of Protocol Buffers for other languges. +- implementations of Protocol Buffers for other languages. - alternate implementations of Protocol Buffers that target specialized use cases. - RPC code generators that create generated APIs for service calls. diff --git a/java/README.md b/java/README.md index 2e2f95229f..dea9e763f2 100644 --- a/java/README.md +++ b/java/README.md @@ -68,7 +68,7 @@ how to use them. Most users should follow the instructions above to use protobuf Java runtime. If you are contributing code to protobuf or want to use a protobuf version -that hasn't been officially released yet, you can folllow the instructions +that hasn't been officially released yet, you can follow the instructions below to build protobuf from source code. ### Build from Source - With Maven diff --git a/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto b/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto index 031433e2a9..95c8d4d2e3 100644 --- a/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto +++ b/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/descriptor.proto @@ -74,7 +74,7 @@ message FileDescriptorProto { optional FileOptions options = 8; // This field contains optional information about the original source code. - // You may safely remove this entire field whithout harming runtime + // You may safely remove this entire field without harming runtime // functionality of the descriptors -- the information is needed only by // development tools. optional SourceCodeInfo source_code_info = 9; diff --git a/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto b/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto index 031433e2a9..95c8d4d2e3 100644 --- a/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto +++ b/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto @@ -74,7 +74,7 @@ message FileDescriptorProto { optional FileOptions options = 8; // This field contains optional information about the original source code. - // You may safely remove this entire field whithout harming runtime + // You may safely remove this entire field without harming runtime // functionality of the descriptors -- the information is needed only by // development tools. optional SourceCodeInfo source_code_info = 9; diff --git a/java/core/src/main/java/com/google/protobuf/ArrayDecoders.java b/java/core/src/main/java/com/google/protobuf/ArrayDecoders.java index 1e33c5a7a3..1217e112e0 100644 --- a/java/core/src/main/java/com/google/protobuf/ArrayDecoders.java +++ b/java/core/src/main/java/com/google/protobuf/ArrayDecoders.java @@ -39,7 +39,7 @@ import java.io.IOException; * Helper functions to decode protobuf wire format from a byte array. * *

Note that these functions don't do boundary check on the byte array but instead rely on Java - * VM to check it. That means parsing rountines utilizing these functions must catch + * VM to check it. That means parsing routines utilizing these functions must catch * IndexOutOfBoundsException and convert it to protobuf's InvalidProtocolBufferException when * crossing protobuf public API boundaries. */ @@ -51,7 +51,7 @@ final class ArrayDecoders { * multiple values and let the function set the return value in this Registers instance instead. * *

TODO(xiaofeng): This could be merged into CodedInputStream or CodedInputStreamReader which - * is already being passed through all the parsing rountines. + * is already being passed through all the parsing routines. */ static final class Registers { public int int1; diff --git a/java/core/src/main/java/com/google/protobuf/Descriptors.java b/java/core/src/main/java/com/google/protobuf/Descriptors.java index 6c0993951a..f27602aeb2 100644 --- a/java/core/src/main/java/com/google/protobuf/Descriptors.java +++ b/java/core/src/main/java/com/google/protobuf/Descriptors.java @@ -1084,7 +1084,7 @@ public final class Descriptors { /** * Does this field have the {@code [packed = true]} option or is this field packable in proto3 - * and not explicitly setted to unpacked? + * and not explicitly set to unpacked? */ @Override public boolean isPacked() { diff --git a/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java b/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java index 07b008004c..27f5210097 100644 --- a/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java +++ b/java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java @@ -223,7 +223,7 @@ public abstract class GeneratedMessageLite< /** * A method that implements different types of operations described in {@link MethodToInvoke}. - * Theses different kinds of operations are required to implement message-level operations for + * These different kinds of operations are required to implement message-level operations for * builders in the runtime. This method bundles those operations to reduce the generated methods * count. * diff --git a/java/core/src/main/java/com/google/protobuf/MapEntryLite.java b/java/core/src/main/java/com/google/protobuf/MapEntryLite.java index ca2a3c2a97..81bf4c2b18 100644 --- a/java/core/src/main/java/com/google/protobuf/MapEntryLite.java +++ b/java/core/src/main/java/com/google/protobuf/MapEntryLite.java @@ -192,7 +192,7 @@ public class MapEntryLite { } /** - * Parses an entry off of the input into the map. This helper avoids allocaton of a {@link + * Parses an entry off of the input into the map. This helper avoids allocation of a {@link * MapEntryLite} by parsing directly into the provided {@link MapFieldLite}. */ public void parseInto( diff --git a/js/binary/utils.js b/js/binary/utils.js index 0d55a4ad36..203eec14f2 100644 --- a/js/binary/utils.js +++ b/js/binary/utils.js @@ -258,7 +258,7 @@ jspb.utils.splitFloat64 = function(value) { // Compute the least significant exponent needed to represent the magnitude of // the value by repeadly dividing/multiplying by 2 until the magnitude // crosses 2. While tempting to use log math to find the exponent, at the - // bounadaries of precision, the result can be off by one. + // boundaries of precision, the result can be off by one. var maxDoubleExponent = 1023; var minDoubleExponent = -1022; var x = value; diff --git a/js/experimental/runtime/kernel/kernel_test.js b/js/experimental/runtime/kernel/kernel_test.js index e72be4f3b6..eba7c4a55a 100644 --- a/js/experimental/runtime/kernel/kernel_test.js +++ b/js/experimental/runtime/kernel/kernel_test.js @@ -699,7 +699,7 @@ describe('Bytes access', () => { expect(accessor.getBytesWithDefault(1)).toEqual(simpleByteString); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer( createArrayBuffer(0x0A, 0x01, 0x00, 0x0A, 0x01, 0x01)); expect(accessor.getBytesWithDefault(1)).toEqual(simpleByteString); @@ -801,7 +801,7 @@ describe('Fixed32 access', () => { expect(accessor.getFixed32WithDefault(1)).toEqual(1); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer( 0x0D, 0x01, 0x00, 0x80, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00)); expect(accessor.getFixed32WithDefault(1)).toEqual(2); @@ -909,7 +909,7 @@ describe('Fixed64 access', () => { expect(accessor.getFixed64WithDefault(1)).toEqual(Int64.fromInt(1)); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer( 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)); @@ -1008,7 +1008,7 @@ describe('Float access', () => { expect(accessor.getFloatWithDefault(1)).toEqual(1); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer( 0x0D, 0x00, 0x00, 0x80, 0x3F, 0x0D, 0x00, 0x00, 0x80, 0xBF)); expect(accessor.getFloatWithDefault(1)).toEqual(-1); @@ -1110,7 +1110,7 @@ describe('Int32 access', () => { expect(accessor.getInt32WithDefault(1)).toEqual(1); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02)); expect(accessor.getInt32WithDefault(1)).toEqual(2); @@ -1207,7 +1207,7 @@ describe('Int64 access', () => { expect(accessor.getInt64WithDefault(1)).toEqual(Int64.fromInt(1)); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02)); expect(accessor.getInt64WithDefault(1)).toEqual(Int64.fromInt(2)); @@ -1306,7 +1306,7 @@ describe('Sfixed32 access', () => { expect(accessor.getSfixed32WithDefault(1)).toEqual(1); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer( 0x0D, 0x01, 0x00, 0x80, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00)); expect(accessor.getSfixed32WithDefault(1)).toEqual(2); @@ -1404,7 +1404,7 @@ describe('Sfixed64 access', () => { expect(accessor.getSfixed64WithDefault(1)).toEqual(Int64.fromInt(1)); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer( 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)); @@ -1502,7 +1502,7 @@ describe('Sint32 access', () => { expect(accessor.getSint32WithDefault(1)).toEqual(1); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x03, 0x08, 0x02)); expect(accessor.getSint32WithDefault(1)).toEqual(1); @@ -1599,7 +1599,7 @@ describe('SInt64 access', () => { expect(accessor.getSint64WithDefault(1)).toEqual(Int64.fromInt(1)); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02)); expect(accessor.getSint64WithDefault(1)).toEqual(Int64.fromInt(1)); @@ -1698,7 +1698,7 @@ describe('String access', () => { expect(accessor.getStringWithDefault(1)).toEqual('a'); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer( createArrayBuffer(0x0A, 0x01, 0x60, 0x0A, 0x01, 0x61)); expect(accessor.getStringWithDefault(1)).toEqual('a'); @@ -1789,7 +1789,7 @@ describe('Uint32 access', () => { expect(accessor.getUint32WithDefault(1)).toEqual(1); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02)); expect(accessor.getUint32WithDefault(1)).toEqual(2); @@ -1896,7 +1896,7 @@ describe('Uint64 access', () => { expect(accessor.getUint64WithDefault(1)).toEqual(Int64.fromInt(1)); }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer(0x08, 0x01, 0x08, 0x02)); expect(accessor.getUint64WithDefault(1)).toEqual(Int64.fromInt(2)); @@ -1996,7 +1996,7 @@ describe('Double access', () => { }); - it('decodes value from wire with multple values being present', () => { + it('decodes value from wire with multiple values being present', () => { const accessor = Kernel.fromArrayBuffer(createArrayBuffer( 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xBF)); diff --git a/js/experimental/runtime/kernel/tag_test.js b/js/experimental/runtime/kernel/tag_test.js index 04a6cb6668..35137bb247 100644 --- a/js/experimental/runtime/kernel/tag_test.js +++ b/js/experimental/runtime/kernel/tag_test.js @@ -95,12 +95,12 @@ describe('skipField', () => { it('skips group in group', () => { const buffer = createArrayBuffer( - 0x0B, // start outter + 0x0B, // start outer 0x10, 0x01, // field: 2, value: 1 0x0B, // start inner group 0x10, 0x01, // payload inner group 0x0C, // stop inner group - 0x0C // end outter + 0x0C // end outer ); const bufferDecoder = BufferDecoder.fromArrayBuffer(buffer); bufferDecoder.setCursor(1); diff --git a/kokoro/release/collect_all_artifacts.sh b/kokoro/release/collect_all_artifacts.sh index 3b7d7d4066..8f6e9db9a0 100755 --- a/kokoro/release/collect_all_artifacts.sh +++ b/kokoro/release/collect_all_artifacts.sh @@ -39,7 +39,7 @@ cp ${INPUT_ARTIFACTS_DIR}/build64/Release/protoc.exe protoc/windows_x64/protoc.e mkdir -p protoc/linux_x86 mkdir -p protoc/linux_x64 # Because of maven unrelated reasonse the linux protoc binaries have a dummy .exe extension. -# For the Google.Protobuf.Tools nuget, we don't want that expection, so we just remove it. +# For the Google.Protobuf.Tools nuget, we don't want that exception, so we just remove it. cp ${INPUT_ARTIFACTS_DIR}/protoc-artifacts/target/linux/x86_32/protoc.exe protoc/linux_x86/protoc cp ${INPUT_ARTIFACTS_DIR}/protoc-artifacts/target/linux/x86_64/protoc.exe protoc/linux_x64/protoc diff --git a/objectivec/DevTools/compile_testing_protos.sh b/objectivec/DevTools/compile_testing_protos.sh index 021e03d0ed..69c32f920b 100755 --- a/objectivec/DevTools/compile_testing_protos.sh +++ b/objectivec/DevTools/compile_testing_protos.sh @@ -95,7 +95,7 @@ cd "${SRCROOT}/.." # ----------------------------------------------------------------------------- RUN_PROTOC=no -# Check to if all the output files exist (incase a new one got added). +# Check to if all the output files exist (in case a new one got added). for PROTO_FILE in "${CORE_PROTO_FILES[@]}" "${OBJC_TEST_PROTO_FILES[@]}"; do DIR=${PROTO_FILE%/*} diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh index 84ed8e9914..4df131408e 100755 --- a/objectivec/DevTools/full_mac_build.sh +++ b/objectivec/DevTools/full_mac_build.sh @@ -285,7 +285,7 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit -destination "platform=iOS Simulator,name=iPhone 7,OS=latest" # 64bit # 10.x also seems to often fail running destinations in parallel (with - # 32bit one include atleast) + # 32bit one include at least) -disable-concurrent-destination-testing ) ;; diff --git a/objectivec/DevTools/pddm.py b/objectivec/DevTools/pddm.py index dacf7bba00..b572cc75b6 100755 --- a/objectivec/DevTools/pddm.py +++ b/objectivec/DevTools/pddm.py @@ -645,7 +645,7 @@ def main(args): opts, extra_args = parser.parse_args(args) if not extra_args: - parser.error('Need atleast one file to process') + parser.error('Need at least one file to process') result = 0 for a_path in extra_args: diff --git a/objectivec/GPBApi.pbobjc.h b/objectivec/GPBApi.pbobjc.h index 287c0516d0..5d55ebf399 100644 --- a/objectivec/GPBApi.pbobjc.h +++ b/objectivec/GPBApi.pbobjc.h @@ -257,7 +257,7 @@ typedef GPB_ENUM(GPBMixin_FieldNumber) { * The mixin construct implies that all methods in `AccessControl` are * also declared with same name and request/response types in * `Storage`. A documentation generator or annotation processor will - * see the effective `Storage.GetAcl` method after inherting + * see the effective `Storage.GetAcl` method after inheriting * documentation and annotations as follows: * * service Storage { diff --git a/objectivec/GPBExtensionInternals.m b/objectivec/GPBExtensionInternals.m index 290c82a1bb..bacec5740a 100644 --- a/objectivec/GPBExtensionInternals.m +++ b/objectivec/GPBExtensionInternals.m @@ -361,8 +361,8 @@ static id NewSingleValueFromInputStream(GPBExtensionDescriptor *extension, if (existingValue) { message = [existingValue retain]; } else { - GPBDescriptor *decriptor = [extension.msgClass descriptor]; - message = [[decriptor.messageClass alloc] init]; + GPBDescriptor *descriptor = [extension.msgClass descriptor]; + message = [[descriptor.messageClass alloc] init]; } if (description->dataType == GPBDataTypeGroup) { diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m index 8e6aaf16e9..7b1263fde9 100644 --- a/objectivec/GPBMessage.m +++ b/objectivec/GPBMessage.m @@ -3286,7 +3286,7 @@ static void ResolveIvarSet(__unsafe_unretained GPBFieldDescriptor *field, // if a sub message in a field has extensions, the issue still exists. A // recursive check could be done here (like the work in // GPBMessageDropUnknownFieldsRecursively()), but that has the potential to - // be expensive and could slow down serialization in DEBUG enought to cause + // be expensive and could slow down serialization in DEBUG enough to cause // developers other problems. NSLog(@"Warning: writing out a GPBMessage (%@) via NSCoding and it" @" has %ld extensions; when read back in, those fields will be" diff --git a/objectivec/GPBUtilities.m b/objectivec/GPBUtilities.m index ee79d00192..e13210210d 100644 --- a/objectivec/GPBUtilities.m +++ b/objectivec/GPBUtilities.m @@ -219,7 +219,7 @@ void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion) { // Library is too old for headers. [NSException raise:NSInternalInconsistencyException format:@"Linked to ProtocolBuffer runtime version %d," - @" but code compiled needing atleast %d!", + @" but code compiled needing at least %d!", GOOGLE_PROTOBUF_OBJC_VERSION, objcRuntimeVersion]; } if (objcRuntimeVersion < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION) { diff --git a/objectivec/GPBUtilities_PackagePrivate.h b/objectivec/GPBUtilities_PackagePrivate.h index 9c29c39c0b..a620288267 100644 --- a/objectivec/GPBUtilities_PackagePrivate.h +++ b/objectivec/GPBUtilities_PackagePrivate.h @@ -304,7 +304,7 @@ void GPBClearAutocreatedMessageIvarWithField(GPBMessage *self, const char *GPBMessageEncodingForSelector(SEL selector, BOOL instanceSel); // Helper for text format name encoding. -// decodeData is the data describing the sepecial decodes. +// decodeData is the data describing the special decodes. // key and inputString are the input that needs decoding. NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key, NSString *inputString); diff --git a/objectivec/README.md b/objectivec/README.md index 5982939290..2583779d38 100644 --- a/objectivec/README.md +++ b/objectivec/README.md @@ -168,7 +168,7 @@ supported keys are: Any number of files can be listed for a framework, just separate them with commas. - There can be multiple lines listing the same frameworkName incase it has a + There can be multiple lines listing the same frameworkName in case it has a lot of proto files included in it; and having multiple lines makes things easier to read. diff --git a/objectivec/Tests/CocoaPods/run_tests.sh b/objectivec/Tests/CocoaPods/run_tests.sh index 6d3e12be30..35bcc18df7 100755 --- a/objectivec/Tests/CocoaPods/run_tests.sh +++ b/objectivec/Tests/CocoaPods/run_tests.sh @@ -90,7 +90,7 @@ cleanup() { echo "Cleaning up..." # Generally don't let things fail, and eat common stdout, but let stderr show - # incase something does hiccup. + # in case something does hiccup. xcodebuild -workspace "${TEST_NAME}.xcworkspace" -scheme "${TEST_NAME}" clean > /dev/null || true pod deintegrate > /dev/null || true # Flush the cache so nothing is left behind. diff --git a/objectivec/Tests/GPBCodedInputStreamTests.m b/objectivec/Tests/GPBCodedInputStreamTests.m index f5aa69038f..6cd5a1ffd7 100644 --- a/objectivec/Tests/GPBCodedInputStreamTests.m +++ b/objectivec/Tests/GPBCodedInputStreamTests.m @@ -422,7 +422,7 @@ - (void)testBOMWithinStrings { // We've seen servers that end up with BOMs within strings (not always at the // start, and sometimes in multiple places), make sure they always parse - // correctly. (Again, this is inpart incase a custom string class is ever + // correctly. (Again, this is inpart in case a custom string class is ever // used again.) const char* strs[] = { "\xEF\xBB\xBF String with BOM", diff --git a/objectivec/Tests/GPBCodedOuputStreamTests.m b/objectivec/Tests/GPBCodedOuputStreamTests.m index 6c9144fb57..a9934acdac 100644 --- a/objectivec/Tests/GPBCodedOuputStreamTests.m +++ b/objectivec/Tests/GPBCodedOuputStreamTests.m @@ -400,7 +400,7 @@ - (void)testWriteStringsWithZeroChar { // Unicode allows `\0` as a character, and NSString is a class cluster, so - // there are a few different classes that could end up beind a given string. + // there are a few different classes that could end up behind a given string. // Historically, we've seen differences based on constant strings in code and // strings built via the NSString apis. So this round trips them to ensure // they are acting as expected. diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index a07885ff9c..59905a8e19 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h @@ -208,7 +208,7 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg); ** store pointers or integers of at least 32 bits (upb isn't really useful on ** systems where sizeof(void*) < 4). ** -** The table must be homogenous (all values of the same type). In debug +** The table must be homogeneous (all values of the same type). In debug ** mode, we check this on insert and lookup. */ @@ -3831,7 +3831,7 @@ extern "C" { #endif enum { - /* When set, emits 0/default values. TOOD(haberman): proto3 only? */ + /* When set, emits 0/default values. TODO(haberman): proto3 only? */ UPB_JSONENC_EMITDEFAULTS = 1, /* When set, use normal (snake_caes) field names instead of JSON (camelCase) diff --git a/php/src/Google/Protobuf/Mixin.php b/php/src/Google/Protobuf/Mixin.php index a2ea59c757..cf6277eb70 100644 --- a/php/src/Google/Protobuf/Mixin.php +++ b/php/src/Google/Protobuf/Mixin.php @@ -46,7 +46,7 @@ use Google\Protobuf\Internal\GPBUtil; * The mixin construct implies that all methods in `AccessControl` are * also declared with same name and request/response types in * `Storage`. A documentation generator or annotation processor will - * see the effective `Storage.GetAcl` method after inherting + * see the effective `Storage.GetAcl` method after inheriting * documentation and annotations as follows: * service Storage { * // Get the underlying ACL object. diff --git a/php/tests/descriptors_test.php b/php/tests/descriptors_test.php index 60a6292cb6..b2c5e0144d 100644 --- a/php/tests/descriptors_test.php +++ b/php/tests/descriptors_test.php @@ -108,7 +108,7 @@ class DescriptorsTest extends TestBase public function testEnumDescriptor() { - // WARNINIG - we need to do this so that TestDescriptorsEnum is registered!!? + // WARNING - we need to do this so that TestDescriptorsEnum is registered!!? new TestDescriptorsMessage(); $pool = DescriptorPool::getGeneratedPool(); diff --git a/php/tests/test.sh b/php/tests/test.sh index b10b57fd19..a987c1e015 100755 --- a/php/tests/test.sh +++ b/php/tests/test.sh @@ -55,7 +55,7 @@ valgrind --leak-check=yes php -dextension=../ext/google/protobuf/modules/protobu valgrind --leak-check=yes php -d protobuf.keep_descriptor_pool_after_request=1 -dextension=../ext/google/protobuf/modules/protobuf.so memory_leak_test.php # TODO(teboring): Only for debug (phpunit has memory leak which blocks this beging used by -# regresssion test.) +# regression test.) # for t in "${tests[@]}" # do diff --git a/python/README.md b/python/README.md index a987c2dac8..cb8b7e9892 100644 --- a/python/README.md +++ b/python/README.md @@ -22,7 +22,7 @@ package. Development Warning =================== -The pure python performance is slow. For better preformance please +The pure python performance is slow. For better performance please use python c++ implementation. Installation diff --git a/python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto b/python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto index 031433e2a9..95c8d4d2e3 100644 --- a/python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto +++ b/python/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/descriptor.proto @@ -74,7 +74,7 @@ message FileDescriptorProto { optional FileOptions options = 8; // This field contains optional information about the original source code. - // You may safely remove this entire field whithout harming runtime + // You may safely remove this entire field without harming runtime // functionality of the descriptors -- the information is needed only by // development tools. optional SourceCodeInfo source_code_info = 9; diff --git a/python/google/protobuf/descriptor.py b/python/google/protobuf/descriptor.py index 5ef81a2298..9a1b76f3d2 100644 --- a/python/google/protobuf/descriptor.py +++ b/python/google/protobuf/descriptor.py @@ -227,7 +227,7 @@ class _NestedDescriptorBase(DescriptorBase): proto: An empty proto instance from descriptor_pb2. Raises: - Error: If self couldnt be serialized, due to to few constructor arguments. + Error: If self couldn't be serialized, due to to few constructor arguments. """ if (self.file is not None and self._serialized_start is not None and @@ -827,7 +827,7 @@ class ServiceDescriptor(_NestedDescriptorBase): Args: name (str): Name of the method. Returns: - MethodDescriptor or None: the desctiptor for the requested method, if + MethodDescriptor or None: the descriptor for the requested method, if found. """ return self.methods_by_name.get(name, None) diff --git a/python/google/protobuf/descriptor_database.py b/python/google/protobuf/descriptor_database.py index 5453f50c80..073eddc711 100644 --- a/python/google/protobuf/descriptor_database.py +++ b/python/google/protobuf/descriptor_database.py @@ -58,7 +58,7 @@ class DescriptorDatabase(object): Raises: DescriptorDatabaseConflictingDefinitionError: if an attempt is made to add a proto with the same name but different definition than an - exisiting proto in the database. + existing proto in the database. """ proto_name = file_desc_proto.name if proto_name not in self._file_desc_protos_by_file: diff --git a/python/google/protobuf/internal/json_format_test.py b/python/google/protobuf/internal/json_format_test.py index 68aa21c43f..2fa951af8a 100755 --- a/python/google/protobuf/internal/json_format_test.py +++ b/python/google/protobuf/internal/json_format_test.py @@ -1064,7 +1064,7 @@ class JsonFormatTest(JsonFormatBase): json_format.ParseError, 'Failed to parse value field: year (0 )?is out of range.', json_format.Parse, text, message) - # Time bigger than maxinum time. + # Time bigger than maximum time. message.value.seconds = 253402300800 self.assertRaisesRegexp( OverflowError, diff --git a/python/google/protobuf/internal/message_test.py b/python/google/protobuf/internal/message_test.py index e5c3c76897..ec76dc5c83 100755 --- a/python/google/protobuf/internal/message_test.py +++ b/python/google/protobuf/internal/message_test.py @@ -1059,7 +1059,7 @@ class MessageTest(unittest.TestCase): self.assertIsInstance(m.optional_string, six.text_type) def testLongValuedSlice(self, message_module): - """It should be possible to use long-valued indicies in slices + """It should be possible to use long-valued indices in slices This didn't used to work in the v2 C++ implementation. """ diff --git a/python/google/protobuf/internal/reflection_test.py b/python/google/protobuf/internal/reflection_test.py index e67248fa62..e052776d63 100755 --- a/python/google/protobuf/internal/reflection_test.py +++ b/python/google/protobuf/internal/reflection_test.py @@ -2813,7 +2813,7 @@ class SerializationTest(unittest.TestCase): proto2.MergeFromString(serialized)) def _CheckRaises(self, exc_class, callable_obj, exception): - """This method checks if the excpetion type and message are as expected.""" + """This method checks if the exception type and message are as expected.""" try: callable_obj() except exc_class as ex: @@ -3267,7 +3267,7 @@ class ClassAPITest(unittest.TestCase): # conflicting message descriptors. def testParsingFlatClassWithExplicitClassDeclaration(self): """Test that the generated class can parse a flat message.""" - # TODO(xiaofeng): This test fails with cpp implemetnation in the call + # TODO(xiaofeng): This test fails with cpp implementation in the call # of six.with_metaclass(). The other two callsites of with_metaclass # in this file are both excluded from cpp test, so it might be expected # to fail. Need someone more familiar with the python code to take a diff --git a/python/google/protobuf/internal/well_known_types.py b/python/google/protobuf/internal/well_known_types.py index cb646a7754..6f55d6b17b 100644 --- a/python/google/protobuf/internal/well_known_types.py +++ b/python/google/protobuf/internal/well_known_types.py @@ -401,7 +401,7 @@ def _CheckDurationValid(seconds, nanos): def _RoundTowardZero(value, divider): """Truncates the remainder part after division.""" - # For some languanges, the sign of the remainder is implementation + # For some languages, the sign of the remainder is implementation # dependent if any of the operands is negative. Here we enforce # "rounded toward zero" semantics. For example, for (-5) / 2 an # implementation may give -3 as the result with the remainder being diff --git a/python/google/protobuf/pyext/scoped_pyobject_ptr.h b/python/google/protobuf/pyext/scoped_pyobject_ptr.h index 9faaa4f93b..6f7fc29813 100644 --- a/python/google/protobuf/pyext/scoped_pyobject_ptr.h +++ b/python/google/protobuf/pyext/scoped_pyobject_ptr.h @@ -77,7 +77,7 @@ class ScopedPythonPtr { PyObject* as_pyobject() const { return reinterpret_cast(ptr_); } - // Increments the reference count fo the current object. + // Increments the reference count of the current object. // Should not be called when no object is held. void inc() const { Py_INCREF(ptr_); } diff --git a/ruby/ext/google/protobuf_c/upb.h b/ruby/ext/google/protobuf_c/upb.h index bdc20ebeef..b7da76fa00 100644 --- a/ruby/ext/google/protobuf_c/upb.h +++ b/ruby/ext/google/protobuf_c/upb.h @@ -200,7 +200,7 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg); ** store pointers or integers of at least 32 bits (upb isn't really useful on ** systems where sizeof(void*) < 4). ** -** The table must be homogenous (all values of the same type). In debug +** The table must be homogeneous (all values of the same type). In debug ** mode, we check this on insert and lookup. */ @@ -6057,7 +6057,7 @@ typedef struct { typedef struct { /* Space optimization note: we store two pointers here that the JIT * doesn't need at all; the upb_handlers* inside the sink and - * the dispatch table pointer. We can optimze so that the JIT uses + * the dispatch table pointer. We can optimize so that the JIT uses * smaller stack frames than the interpreter. The only thing we need * to guarantee is that the fallback routines can find end_ofs. */ upb_sink sink; diff --git a/src/google/protobuf/api.proto b/src/google/protobuf/api.proto index f37ee2fa46..bf5da15880 100644 --- a/src/google/protobuf/api.proto +++ b/src/google/protobuf/api.proto @@ -169,7 +169,7 @@ message Method { // The mixin construct implies that all methods in `AccessControl` are // also declared with same name and request/response types in // `Storage`. A documentation generator or annotation processor will -// see the effective `Storage.GetAcl` method after inherting +// see the effective `Storage.GetAcl` method after inheriting // documentation and annotations as follows: // // service Storage { diff --git a/src/google/protobuf/arena_test_util.h b/src/google/protobuf/arena_test_util.h index 84df34989c..8ceab91aab 100644 --- a/src/google/protobuf/arena_test_util.h +++ b/src/google/protobuf/arena_test_util.h @@ -84,7 +84,7 @@ class NoHeapChecker { private: class NewDeleteCapture { public: - // TOOD(xiaofeng): Implement this for opensource protobuf. + // TODO(xiaofeng): Implement this for opensource protobuf. void Hook() {} void Unhook() {} int alloc_count() { return 0; } diff --git a/src/google/protobuf/compiler/command_line_interface.h b/src/google/protobuf/compiler/command_line_interface.h index 3c95cd6ee9..b89d4e47fc 100644 --- a/src/google/protobuf/compiler/command_line_interface.h +++ b/src/google/protobuf/compiler/command_line_interface.h @@ -104,7 +104,7 @@ class DiskSourceTree; // importer.h // 2. protoc --proto_path=src foo.proto (virtual path relative to src) // // If a file path can be interpreted both as a physical file path and as a -// relative virtual path, the physical file path takes precendence. +// relative virtual path, the physical file path takes precedence. // // For a full description of the command-line syntax, invoke it with --help. class PROTOC_EXPORT CommandLineInterface { diff --git a/src/google/protobuf/compiler/cpp/cpp_message.h b/src/google/protobuf/compiler/cpp/cpp_message.h index a212ff416b..661b6b6ec6 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.h +++ b/src/google/protobuf/compiler/cpp/cpp_message.h @@ -113,7 +113,7 @@ class MessageGenerator { bool GenerateParseTable(io::Printer* printer, size_t offset, size_t aux_offset); - // Generate the field offsets array. Returns the a pair of the total numer + // Generate the field offsets array. Returns the a pair of the total number // of entries generated and the index of the first has_bit entry. std::pair GenerateOffsets(io::Printer* printer); void GenerateSchema(io::Printer* printer, int offset, int has_offset); diff --git a/src/google/protobuf/compiler/importer_unittest.cc b/src/google/protobuf/compiler/importer_unittest.cc index dc5c6929cc..59a6a9e269 100644 --- a/src/google/protobuf/compiler/importer_unittest.cc +++ b/src/google/protobuf/compiler/importer_unittest.cc @@ -463,13 +463,13 @@ TEST_F(DiskSourceTreeTest, DiskFileToVirtualFileCanonicalization) { source_tree_.DiskFileToVirtualFile("../../baz", &virtual_file, &shadowing_disk_file)); - // "/foo" is not mapped (it should not be misintepreted as being under "."). + // "/foo" is not mapped (it should not be misinterpreted as being under "."). EXPECT_EQ(DiskSourceTree::NO_MAPPING, source_tree_.DiskFileToVirtualFile("/foo", &virtual_file, &shadowing_disk_file)); #ifdef WIN32 - // "C:\foo" is not mapped (it should not be misintepreted as being under "."). + // "C:\foo" is not mapped (it should not be misinterpreted as being under "."). EXPECT_EQ(DiskSourceTree::NO_MAPPING, source_tree_.DiskFileToVirtualFile("C:\\foo", &virtual_file, &shadowing_disk_file)); diff --git a/src/google/protobuf/compiler/java/java_enum_field.cc b/src/google/protobuf/compiler/java/java_enum_field.cc index 32cff15fec..7eb9c75485 100644 --- a/src/google/protobuf/compiler/java/java_enum_field.cc +++ b/src/google/protobuf/compiler/java/java_enum_field.cc @@ -712,7 +712,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateBuilderMembers( // list is immutable. If it's immutable, the invariant is that it must // either an instance of Collections.emptyList() or it's an ArrayList // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to + // a reference to the underlying ArrayList. This invariant allows us to // share instances of lists between protocol buffers avoiding expensive // memory allocations. Note, immutable is a strong guarantee here -- not // just that the list cannot be modified via the reference but that the diff --git a/src/google/protobuf/compiler/java/java_message_field.cc b/src/google/protobuf/compiler/java/java_message_field.cc index 67273fa289..96c0c11276 100644 --- a/src/google/protobuf/compiler/java/java_message_field.cc +++ b/src/google/protobuf/compiler/java/java_message_field.cc @@ -944,7 +944,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateBuilderMembers( // list is immutable. If it's immutable, the invariant is that it must // either an instance of Collections.emptyList() or it's an ArrayList // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to + // a reference to the underlying ArrayList. This invariant allows us to // share instances of lists between protocol buffers avoiding expensive // memory allocations. Note, immutable is a strong guarantee here -- not // just that the list cannot be modified via the reference but that the diff --git a/src/google/protobuf/compiler/java/java_primitive_field.cc b/src/google/protobuf/compiler/java/java_primitive_field.cc index 2572aee79a..f0b3d0959e 100644 --- a/src/google/protobuf/compiler/java/java_primitive_field.cc +++ b/src/google/protobuf/compiler/java/java_primitive_field.cc @@ -703,7 +703,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateBuilderMembers( // list is immutable. If it's immutable, the invariant is that it must // either an instance of Collections.emptyList() or it's an ArrayList // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to + // a reference to the underlying ArrayList. This invariant allows us to // share instances of lists between protocol buffers avoiding expensive // memory allocations. Note, immutable is a strong guarantee here -- not // just that the list cannot be modified via the reference but that the diff --git a/src/google/protobuf/compiler/java/java_string_field.cc b/src/google/protobuf/compiler/java/java_string_field.cc index 8e1595b89d..37e81b1100 100644 --- a/src/google/protobuf/compiler/java/java_string_field.cc +++ b/src/google/protobuf/compiler/java/java_string_field.cc @@ -801,7 +801,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateBuilderMembers( // list is immutable. If it's immutable, the invariant is that it must // either an instance of Collections.emptyList() or it's an ArrayList // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to + // a reference to the underlying ArrayList. This invariant allows us to // share instances of lists between protocol buffers avoiding expensive // memory allocations. Note, immutable is a strong guarantee here -- not // just that the list cannot be modified via the reference but that the diff --git a/src/google/protobuf/compiler/js/js_generator.h b/src/google/protobuf/compiler/js/js_generator.h index 3e7221b77c..e452020a77 100644 --- a/src/google/protobuf/compiler/js/js_generator.h +++ b/src/google/protobuf/compiler/js/js_generator.h @@ -125,10 +125,10 @@ struct GeneratorOptions { std::string extension; // Create a separate output file for each input file? bool one_output_file_per_input_file; - // If true, we should append annotations as commen on the last line for + // If true, we should append annotations as comments on the last line for // generated .js file. Annotations used by tools like https://kythe.io // to provide cross-references between .js and .proto files. Annotations - // are enced as base64 proto of GeneratedCodeInfo message (see + // are encoded as base64 proto of GeneratedCodeInfo message (see // descriptor.proto). bool annotate_code; }; diff --git a/src/google/protobuf/compiler/objectivec/objectivec_file.cc b/src/google/protobuf/compiler/objectivec/objectivec_file.cc index 58ca9c195b..ce4a12c987 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_file.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_file.cc @@ -421,7 +421,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) { "#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n"); if (includes_oneof) { // The generated code for oneof's uses direct ivar access, suppress the - // warning incase developer turn that on in the context they compile the + // warning in case developer turn that on in the context they compile the // generated code. printer->Print( "#pragma clang diagnostic ignored \"-Wdirect-ivar-access\"\n"); diff --git a/src/google/protobuf/compiler/objectivec/objectivec_generator.cc b/src/google/protobuf/compiler/objectivec/objectivec_generator.cc index 2b564114d5..a1a6f529e4 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_generator.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_generator.cc @@ -123,7 +123,7 @@ bool ObjectiveCGenerator::GenerateAll(const std::vector& // Any number of files can be listed for a framework, just separate them // with commas. // - // There can be multiple lines listing the same frameworkName incase it + // There can be multiple lines listing the same frameworkName in case it // has a lot of proto files included in it; having multiple lines makes // things easier to read. If a proto file is not configured in the // mappings file, it will use the default framework name if one was passed diff --git a/src/google/protobuf/compiler/python/python_generator.cc b/src/google/protobuf/compiler/python/python_generator.cc index fd42882a08..f2a97cf636 100644 --- a/src/google/protobuf/compiler/python/python_generator.cc +++ b/src/google/protobuf/compiler/python/python_generator.cc @@ -1067,7 +1067,7 @@ void Generator::FixContainingTypeInDescriptor( } // Prints statements setting the message_type and enum_type fields in the -// Python descriptor objects we've already output in ths file. We must +// Python descriptor objects we've already output in the file. We must // do this in a separate step due to circular references (otherwise, we'd // just set everything in the initial assignment statements). void Generator::FixForeignFieldsInDescriptors() const { diff --git a/src/google/protobuf/compiler/ruby/ruby_generator.cc b/src/google/protobuf/compiler/ruby/ruby_generator.cc index 97734cd5bc..ebc972c148 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator.cc +++ b/src/google/protobuf/compiler/ruby/ruby_generator.cc @@ -413,7 +413,7 @@ int GeneratePackageModules(const FileDescriptor* file, io::Printer* printer) { // If :: is in the package use the Ruby formatted name as-is // -> A::B::C - // otherwise, use the dot seperator + // otherwise, use the dot separator // -> A.B.C if (package_name.find("::") != std::string::npos) { need_change_to_module = false; diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc index 9a448ffc80..f8fefc94d8 100644 --- a/src/google/protobuf/descriptor.cc +++ b/src/google/protobuf/descriptor.cc @@ -6131,7 +6131,7 @@ void DescriptorBuilder::ValidateFieldOptions( // json_name option is not allowed on extension fields. Note that the // json_name field in FieldDescriptorProto is always populated by protoc - // when it sends descriptor data to plugins (caculated from field name if + // when it sends descriptor data to plugins (calculated from field name if // the option is not explicitly set) so we can't rely on its presence to // determine whether the json_name option is set on the field. Here we // compare it against the default calculated json_name value and consider diff --git a/src/google/protobuf/descriptor_unittest.cc b/src/google/protobuf/descriptor_unittest.cc index 6085a122a8..a5d41b7692 100644 --- a/src/google/protobuf/descriptor_unittest.cc +++ b/src/google/protobuf/descriptor_unittest.cc @@ -479,7 +479,7 @@ TEST_F(FileDescriptorTest, FindExtensionByNumber) { TEST_F(FileDescriptorTest, BuildAgain) { - // Test that if te call BuildFile again on the same input we get the same + // Test that if we call BuildFile again on the same input we get the same // FileDescriptor back. FileDescriptorProto file; foo_file_->CopyTo(&file); diff --git a/src/google/protobuf/generated_message_table_driven.h b/src/google/protobuf/generated_message_table_driven.h index 41ec74d92f..9ff58e0454 100644 --- a/src/google/protobuf/generated_message_table_driven.h +++ b/src/google/protobuf/generated_message_table_driven.h @@ -102,7 +102,7 @@ struct PROTOBUF_EXPORT FieldMetadata { kNumTypeClasses // must be last enum }; // C++ protobuf has 20 fundamental types, were we added Cord and StringPiece - // and also distinquish the same types if they have different wire format. + // and also distinguish the same types if they have different wire format. enum { kCordType = 19, kStringPieceType = 20, diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h index 5f9feb80c3..0fff1782cf 100644 --- a/src/google/protobuf/io/coded_stream.h +++ b/src/google/protobuf/io/coded_stream.h @@ -960,7 +960,7 @@ class PROTOBUF_EXPORT EpsCopyOutputStream { // buffers to ensure there is no error as of yet. uint8* FlushAndResetBuffer(uint8*); - // The following functions mimick the old CodedOutputStream behavior as close + // The following functions mimic the old CodedOutputStream behavior as close // as possible. They flush the current state to the stream, behave as // the old CodedOutputStream and then return to normal operation. bool Skip(int count, uint8** pp); @@ -1159,7 +1159,7 @@ class PROTOBUF_EXPORT CodedOutputStream { // This is identical to WriteVarint32(), but optimized for writing tags. // In particular, if the input is a compile-time constant, this method // compiles down to a couple instructions. - // Always inline because otherwise the aformentioned optimization can't work, + // Always inline because otherwise the aforementioned optimization can't work, // but GCC by default doesn't want to inline this. void WriteTag(uint32 value); // Like WriteTag() but writing directly to the target array. diff --git a/src/google/protobuf/io/zero_copy_stream_unittest.cc b/src/google/protobuf/io/zero_copy_stream_unittest.cc index bec9df0af6..b749ca98fa 100644 --- a/src/google/protobuf/io/zero_copy_stream_unittest.cc +++ b/src/google/protobuf/io/zero_copy_stream_unittest.cc @@ -112,7 +112,7 @@ class IoTest : public testing::Test { // that it matches the string. void ReadString(ZeroCopyInputStream* input, const std::string& str); // Writes some text to the output stream in a particular order. Returns - // the number of bytes written, incase the caller needs that to set up an + // the number of bytes written, in case the caller needs that to set up an // input stream. int WriteStuff(ZeroCopyOutputStream* output); // Reads text from an input stream and expects it to match what diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h index a1722db0ec..2bb35572a3 100644 --- a/src/google/protobuf/map.h +++ b/src/google/protobuf/map.h @@ -385,7 +385,7 @@ class Map { // 9. Except for erase(iterator), any non-const method can reorder iterators. // 10. InnerMap uses KeyForTree when using the Tree representation, which // is either `Key`, if Key is a scalar, or `reference_wrapper` - // otherwise. This avoids unncessary copies of string keys, for example. + // otherwise. This avoids unnecessary copies of string keys, for example. class InnerMap : private hasher { public: explicit InnerMap(size_type n) : InnerMap(nullptr, n) {} diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h index 9ea3fad80d..f32b086d1a 100644 --- a/src/google/protobuf/map_field.h +++ b/src/google/protobuf/map_field.h @@ -272,7 +272,7 @@ class MapFieldAccessor; // This class provides access to map field using reflection, which is the same // as those provided for RepeatedPtrField. It is used for internal -// reflection implentation only. Users should never use this directly. +// reflection implementation only. Users should never use this directly. class PROTOBUF_EXPORT MapFieldBase { public: MapFieldBase() @@ -421,7 +421,7 @@ class TypeDefinedMapFieldBase : public MapFieldBase { }; // This class provides access to map field using generated api. It is used for -// internal generated message implentation only. Users should never use this +// internal generated message implementation only. Users should never use this // directly. template EpsCopyInputStream::DoneFallback(const char* ptr, if (PROTOBUF_PREDICT_FALSE(overrun != 0)) return {nullptr, true}; GOOGLE_DCHECK(limit_ > 0); limit_end_ = buffer_end_; - // Distinquish ending on a pushed limit or ending on end-of-stream. + // Distinguish ending on a pushed limit or ending on end-of-stream. SetEndOfStream(); return {ptr, true}; } diff --git a/src/google/protobuf/stubs/casts.h b/src/google/protobuf/stubs/casts.h index 83750bd786..d8a49cec34 100644 --- a/src/google/protobuf/stubs/casts.h +++ b/src/google/protobuf/stubs/casts.h @@ -47,7 +47,7 @@ namespace internal { // When you use implicit_cast, the compiler checks that the cast is safe. // Such explicit implicit_casts are necessary in surprisingly many // situations where C++ demands an exact type match instead of an -// argument type convertable to a target type. +// argument type convertible to a target type. // // The From type can be inferred, so the preferred syntax for using // implicit_cast is the same as for static_cast etc.: diff --git a/src/google/protobuf/stubs/common.cc b/src/google/protobuf/stubs/common.cc index 4db493b70c..30802b1bb4 100644 --- a/src/google/protobuf/stubs/common.cc +++ b/src/google/protobuf/stubs/common.cc @@ -304,7 +304,7 @@ void DoNothing() {} // // TODO(xiaofeng): PROTOBUF_LITTLE_ENDIAN is unfortunately defined in // google/protobuf/io/coded_stream.h and therefore can not be used here. -// Maybe move that macro definition here in the furture. +// Maybe move that macro definition here in the future. uint32 ghtonl(uint32 x) { union { uint32 result; diff --git a/src/google/protobuf/stubs/time_test.cc b/src/google/protobuf/stubs/time_test.cc index fc72925fa9..1ce0a1c130 100644 --- a/src/google/protobuf/stubs/time_test.cc +++ b/src/google/protobuf/stubs/time_test.cc @@ -38,7 +38,7 @@ namespace internal { namespace { static const int64 kSecondsPerDay = 3600 * 24; -// For DateTime, tests will mostly focuse on the date part because that's +// For DateTime, tests will mostly focus on the date part because that's // the tricky one. int64 CreateTimestamp(int year, int month, int day) { DateTime time; diff --git a/src/google/protobuf/text_format_unittest.cc b/src/google/protobuf/text_format_unittest.cc index 0ae2def2dc..6ac63edd7e 100644 --- a/src/google/protobuf/text_format_unittest.cc +++ b/src/google/protobuf/text_format_unittest.cc @@ -718,7 +718,7 @@ TEST_F(TextFormatTest, CompactRepeatedFieldPrinter) { text); } -// Print strings into multiple line, with indention. Use this to test +// Print strings into multiple line, with indentation. Use this to test // BaseTextGenerator::Indent and BaseTextGenerator::Outdent. class MultilineStringPrinter : public TextFormat::FastFieldValuePrinter { public: @@ -2031,7 +2031,7 @@ TEST(TextFormatUnknownFieldTest, TestUnknownField) { " }\n" ">", &proto)); - // Unmatched delimeters for message body + // Unmatched delimiters for message body EXPECT_FALSE(parser.ParseFromString("unknown_message: {>", &proto)); // Unknown extension EXPECT_TRUE( diff --git a/src/google/protobuf/util/field_mask_util.cc b/src/google/protobuf/util/field_mask_util.cc index 547a4dcc72..23800181b4 100644 --- a/src/google/protobuf/util/field_mask_util.cc +++ b/src/google/protobuf/util/field_mask_util.cc @@ -199,7 +199,7 @@ class FieldMaskTree { // Remove a path from the tree. // If the path is a sub-path of an existing field path in the tree, it means - // we need remove the existing fied path and add all sub-paths except + // we need remove the existing field path and add all sub-paths except // specified path. If the path matches an existing node in the tree, this node // will be moved. void RemovePath(const std::string& path, const Descriptor* descriptor); @@ -332,7 +332,7 @@ void FieldMaskTree::AddPath(const std::string& path) { for (int i = 0; i < parts.size(); ++i) { if (!new_branch && node != &root_ && node->children.empty()) { // Path matches an existing leaf node. This means the path is already - // coverred by this tree (for example, adding "foo.bar.baz" to a tree + // covered by this tree (for example, adding "foo.bar.baz" to a tree // which already contains "foo.bar"). return; } @@ -707,7 +707,7 @@ bool FieldMaskUtil::TrimMessage(const FieldMask& mask, Message* message, // fields. FieldMaskTree tree; tree.MergeFromFieldMask(mask); - // If keep_required_fields is true, implicitely add required fields of + // If keep_required_fields is true, implicitly add required fields of // a message present in the tree to prevent from trimming. if (options.keep_required_fields()) { tree.AddRequiredFieldPath(GOOGLE_CHECK_NOTNULL(message->GetDescriptor())); diff --git a/src/google/protobuf/util/internal/constants.h b/src/google/protobuf/util/internal/constants.h index 6acf970e96..adaf0300fe 100644 --- a/src/google/protobuf/util/internal/constants.h +++ b/src/google/protobuf/util/internal/constants.h @@ -49,7 +49,7 @@ const char kRfc3339TimeFormat[] = "%E4Y-%m-%dT%H:%M:%S"; // timestamps like "1-01-0001T23:59:59Z" instead of "0001-01-0001T23:59:59Z". const char kRfc3339TimeFormatNoPadding[] = "%Y-%m-%dT%H:%M:%S"; -// Minimun seconds allowed in a google.protobuf.Timestamp value. +// Minimum seconds allowed in a google.protobuf.Timestamp value. const int64 kTimestampMinSeconds = -62135596800LL; // Maximum seconds allowed in a google.protobuf.Timestamp value. diff --git a/src/google/protobuf/util/internal/json_objectwriter.h b/src/google/protobuf/util/internal/json_objectwriter.h index 9e00712389..ab372abd87 100644 --- a/src/google/protobuf/util/internal/json_objectwriter.h +++ b/src/google/protobuf/util/internal/json_objectwriter.h @@ -152,7 +152,7 @@ class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter { return false; } - // Whether we are currently renderring inside a JSON object (i.e., between + // Whether we are currently rendering inside a JSON object (i.e., between // StartObject() and EndObject()). bool is_json_object() const { return is_json_object_; } diff --git a/src/google/protobuf/util/internal/json_stream_parser_test.cc b/src/google/protobuf/util/internal/json_stream_parser_test.cc index e4341fa0ea..aa4751d80b 100644 --- a/src/google/protobuf/util/internal/json_stream_parser_test.cc +++ b/src/google/protobuf/util/internal/json_stream_parser_test.cc @@ -146,7 +146,7 @@ class JsonStreamParserTest : public ::testing::Test { #ifndef _MSC_VER // TODO(xiaofeng): We have to disable InSequence check for MSVC because it - // causes stack overflow due to its use of a linked list that is desctructed + // causes stack overflow due to its use of a linked list that is destructed // recursively. ::testing::InSequence in_sequence_; #endif // !_MSC_VER diff --git a/src/google/protobuf/util/internal/type_info_test_helper.h b/src/google/protobuf/util/internal/type_info_test_helper.h index 3cafbceb37..923050d8b7 100644 --- a/src/google/protobuf/util/internal/type_info_test_helper.h +++ b/src/google/protobuf/util/internal/type_info_test_helper.h @@ -63,7 +63,7 @@ class TypeInfoTestHelper { // Creates a TypeInfo object for the given set of descriptors. void ResetTypeInfo(const std::vector& descriptors); - // Convinent overloads. + // Convenient overloads. void ResetTypeInfo(const Descriptor* descriptor); void ResetTypeInfo(const Descriptor* descriptor1, const Descriptor* descriptor2); diff --git a/src/google/protobuf/util/internal/utility.h b/src/google/protobuf/util/internal/utility.h index 6ce9023d6a..0d37a153f3 100644 --- a/src/google/protobuf/util/internal/utility.h +++ b/src/google/protobuf/util/internal/utility.h @@ -82,7 +82,7 @@ PROTOBUF_EXPORT std::string GetStringOptionOrDefault( // Returns a boolean value contained in Any type. // TODO(skarvaje): Make these utilities dealing with Any types more generic, -// add more error checking and move to a more public/sharable location so others +// add more error checking and move to a more public/shareable location so others // can use. PROTOBUF_EXPORT bool GetBoolFromAny(const google::protobuf::Any& any); diff --git a/src/google/protobuf/util/message_differencer.cc b/src/google/protobuf/util/message_differencer.cc index f5e0860c1c..c7d0261a7c 100644 --- a/src/google/protobuf/util/message_differencer.cc +++ b/src/google/protobuf/util/message_differencer.cc @@ -1526,7 +1526,7 @@ int MaximumMatcher::FindMaximumMatch(bool early_return) { } } // Backfill match_list1_ as we only filled match_list2_ when finding - // argumenting pathes. + // argumenting paths. for (int i = 0; i < count2_; ++i) { if ((*match_list2_)[i] != -1) { (*match_list1_)[(*match_list2_)[i]] = i; diff --git a/src/google/protobuf/util/message_differencer.h b/src/google/protobuf/util/message_differencer.h index f7317c80fe..32688706d6 100644 --- a/src/google/protobuf/util/message_differencer.h +++ b/src/google/protobuf/util/message_differencer.h @@ -328,7 +328,7 @@ class PROTOBUF_EXPORT MessageDifferencer { // Abstract base class from which all IgnoreCriteria derive. // By adding IgnoreCriteria more complex ignore logic can be implemented. - // IgnoreCriteria are registed with AddIgnoreCriteria. For each compared + // IgnoreCriteria are registered with AddIgnoreCriteria. For each compared // field IsIgnored is called on each added IgnoreCriteria until one returns // true or all return false. // IsIgnored is called for fields where at least one side has a value.