diff --git a/README.md b/README.md index a94301b0c91a..d1790476faee 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) { storages::postgres::ClusterHostType::kSlave, // Query is converted into a prepared statement. Subsequent requests // send only parameters in a binary form and meta information is - // discarded on the DB side, significantly saving network bandwith. + // discarded on the DB side, significantly saving network bandwidth. "SELECT value FROM key_value_table WHERE key=$1", key ); diff --git a/chaotic-openapi/chaotic_openapi/back/cpp_client/templates/client_impl.cpp.jinja b/chaotic-openapi/chaotic_openapi/back/cpp_client/templates/client_impl.cpp.jinja index f5f0ec777932..0026491295dd 100644 --- a/chaotic-openapi/chaotic_openapi/back/cpp_client/templates/client_impl.cpp.jinja +++ b/chaotic-openapi/chaotic_openapi/back/cpp_client/templates/client_impl.cpp.jinja @@ -18,7 +18,7 @@ ClientImpl::ClientImpl(const USERVER_NAMESPACE::chaotic::openapi::client::Config auto r = http_client_.CreateRequest(); SerializeRequest(request, r); ApplyConfig(r, command_control, config_); - {# TODO: apply extentions #} + {# TODO: apply extensions #} auto response = r.perform(); return {{ op.cpp_namespace() }}::ParseResponse(*response); } diff --git a/core/src/server/http/http2_writer.cpp b/core/src/server/http/http2_writer.cpp index ad2a42ab15d1..7630f4cb9241 100644 --- a/core/src/server/http/http2_writer.cpp +++ b/core/src/server/http/http2_writer.cpp @@ -155,9 +155,9 @@ class Http2ResponseWriter final { if (headers.find(USERVER_NAMESPACE::http::headers::kContentType) == end) { header_writer.AddKeyValue(USERVER_NAMESPACE::http::headers::kContentType, kDefaultContentType); } - std::string_view content_lenght_header{USERVER_NAMESPACE::http::headers::kContentLength}; + std::string_view content_length_header{USERVER_NAMESPACE::http::headers::kContentLength}; for (const auto& [key, value] : headers) { - if (key == content_lenght_header) { + if (key == content_length_header) { continue; } header_writer.AddKeyValue(key, value); diff --git a/grpc/tests/tests/service_multichannel.hpp b/grpc/tests/tests/service_multichannel.hpp index 8d66baf1d0ec..d6b99551cec2 100644 --- a/grpc/tests/tests/service_multichannel.hpp +++ b/grpc/tests/tests/service_multichannel.hpp @@ -9,7 +9,7 @@ namespace tests { /// Sets up a mini gRPC server using a single default-constructed service /// implementation. Will create the client with number of connections -/// dependening on the UTEST_P parameter value. +/// depending on the UTEST_P parameter value. template // NOLINTNEXTLINE(fuchsia-multiple-inheritance) class ServiceFixtureMultichannel : public ::testing::Test, diff --git a/kafka/include/userver/kafka/offset_range.hpp b/kafka/include/userver/kafka/offset_range.hpp index 535e9b6e0ff4..be2ed8f0994c 100644 --- a/kafka/include/userver/kafka/offset_range.hpp +++ b/kafka/include/userver/kafka/offset_range.hpp @@ -9,11 +9,11 @@ namespace kafka { /// @brief Represents the range of offsets for certain topic. struct OffsetRange final { /// @brief The low watermark offset. It indicates the earliest available offset in Kafka. - /// @note low offset is guaranteed to be commited + /// @note low offset is guaranteed to be committed std::uint32_t low{}; /// @brief The high watermark offset. It indicates the next offset that will be written in Kafka. - /// @note high offset is not required to be commited yet + /// @note high offset is not required to be committed yet std::uint32_t high{}; }; diff --git a/kafka/src/kafka/impl/producer_impl.hpp b/kafka/src/kafka/impl/producer_impl.hpp index ec9c8a02de7c..d20dd09af500 100644 --- a/kafka/src/kafka/impl/producer_impl.hpp +++ b/kafka/src/kafka/impl/producer_impl.hpp @@ -79,7 +79,7 @@ class ProducerImpl final { /// @brief Callback called on each succeeded/failed message delivery. /// @param message represents the delivered (or not) message. Its `_private` /// field contains and `opaque` argument, which was passed to - /// `rd_kafka_producev`, i.e. the Promise which must be setted to notify + /// `rd_kafka_producev`, i.e. the Promise which must be set to notify /// waiter about the delivery. void DeliveryReportCallback(const rd_kafka_message_s* message) const; diff --git a/kafka/tests/consumer_kafkatest.cpp b/kafka/tests/consumer_kafkatest.cpp index 632018ef410c..14441f73ff76 100644 --- a/kafka/tests/consumer_kafkatest.cpp +++ b/kafka/tests/consumer_kafkatest.cpp @@ -249,7 +249,7 @@ UTEST_F_MT(ConsumerTest, OneConsumerPartitionOffsets, 2) { ); EXPECT_EQ(offset_range.low, 0u); - // Note that offset is not yet commited, just fetched + // Note that offset is not yet committed, just fetched if (msg.GetPartition() != kFirstPartition) { EXPECT_EQ(offset_range.high, 1u); } else { diff --git a/libraries/grpc-reflection/library.yaml b/libraries/grpc-reflection/library.yaml index e8a02a8eb9c3..bd5bb41a0b38 100644 --- a/libraries/grpc-reflection/library.yaml +++ b/libraries/grpc-reflection/library.yaml @@ -4,7 +4,7 @@ project-alt-names: description: library with reflection implementation maintainers: - - Common componets + - Common components libraries: - userver-core diff --git a/libraries/grpc-reflection/proto/reflection.proto b/libraries/grpc-reflection/proto/reflection.proto index 816852f82534..833ab28f1ea4 100644 --- a/libraries/grpc-reflection/proto/reflection.proto +++ b/libraries/grpc-reflection/proto/reflection.proto @@ -72,7 +72,7 @@ message ExtensionRequest { message ServerReflectionResponse { string valid_host = 1; ServerReflectionRequest original_request = 2; - // The server set one of the following fields accroding to the message_request + // The server set one of the following fields according to the message_request // in the request. oneof message_response { // This message is used to answer file_by_filename, file_containing_symbol, @@ -83,7 +83,7 @@ message ServerReflectionResponse { // that were previously sent in response to earlier requests in the stream. FileDescriptorResponse file_descriptor_response = 4; - // This message is used to answer all_extension_numbers_of_type requst. + // This message is used to answer all_extension_numbers_of_type request. ExtensionNumberResponse all_extension_numbers_response = 5; // This message is used to answer list_services request. diff --git a/postgresql/src/storages/postgres/exceptions.cpp b/postgresql/src/storages/postgres/exceptions.cpp index e19de63a2264..8a04c671d927 100644 --- a/postgresql/src/storages/postgres/exceptions.cpp +++ b/postgresql/src/storages/postgres/exceptions.cpp @@ -236,7 +236,7 @@ InvalidParserCategory::InvalidParserCategory( UnknownBufferCategory::UnknownBufferCategory(std::string_view context, Oid type_oid) : ResultSetError(fmt::format( "Query {} doesn't have a parser. Database type {} and it was not retrieved in C++ code as a corresponding " - "C++ type. Refer to the 'Supported data types' in the documentation to find a propper C++ type.", + "C++ type. Refer to the 'Supported data types' in the documentation to find a proper C++ type.", context, impl::OidPrettyPrint(type_oid) )), @@ -249,7 +249,7 @@ UnknownBufferCategory::UnknownBufferCategory( ) : ResultSetError(fmt::format( "Database type {} and it is not representable as a C++ type '{}' within a C++ composite '{}'. Refer to " - "the 'Supported data types' in the documentation to find a propper C++ type.", + "the 'Supported data types' in the documentation to find a proper C++ type.", impl::OidPrettyPrint(type_oid), cpp_field_type, cpp_composite_type diff --git a/postgresql/src/storages/postgres/tests/composite_types_pgtest.cpp b/postgresql/src/storages/postgres/tests/composite_types_pgtest.cpp index 419441ad8814..ff39a0647f9a 100644 --- a/postgresql/src/storages/postgres/tests/composite_types_pgtest.cpp +++ b/postgresql/src/storages/postgres/tests/composite_types_pgtest.cpp @@ -868,7 +868,7 @@ UTEST_P(PostgreConnection, UnknownBufferCategoryExceptionReadability) { storages::postgres::UnknownBufferCategory, "Database type is 'tsquery' (oid: 3615) and it is not representable as a C++ type 'int' within a C++ composite " "'PairForUnknownBufferCategoryExceptionReadabilityTest'. Refer to the 'Supported data types' in the " - "documentation to find a propper C++ type." + "documentation to find a proper C++ type." ); } diff --git a/postgresql/src/storages/postgres/tests/user_types_pgtest.cpp b/postgresql/src/storages/postgres/tests/user_types_pgtest.cpp index 77e0900869a5..1cafd815330a 100644 --- a/postgresql/src/storages/postgres/tests/user_types_pgtest.cpp +++ b/postgresql/src/storages/postgres/tests/user_types_pgtest.cpp @@ -361,7 +361,7 @@ UTEST_P(PostgreConnection, UnknownParserExceptionReadability) { storages::postgres::UnknownBufferCategory, "Query result set field `tsquery` doesn't have a parser. Database type is 'tsquery' (oid: 3615) and it was not " "retrieved in C++ code as a corresponding C++ type. Refer to the 'Supported data types' in the documentation " - "to find a propper C++ type." + "to find a proper C++ type." ); } diff --git a/samples/s3api/src/s3api_client.hpp b/samples/s3api/src/s3api_client.hpp index 3d3e8baa8572..5a0d5cae3675 100644 --- a/samples/s3api/src/s3api_client.hpp +++ b/samples/s3api/src/s3api_client.hpp @@ -10,7 +10,7 @@ namespace samples { /// [s3_sample_component] -// This component is not required to create S3 api client. It is used for demonstation +// This component is not required to create S3 api client. It is used for demonstration // purposes only. class S3ApiSampleComponent : public components::LoggableComponentBase { public: diff --git a/scripts/docs/en/landing.md b/scripts/docs/en/landing.md index a1fced4d933f..23005476a811 100644 --- a/scripts/docs/en/landing.md +++ b/scripts/docs/en/landing.md @@ -152,7 +152,7 @@ int main(int argc, char* argv[]) { storages::postgres::ClusterHostType::kSlave, // Query is converted into a prepared statement. Subsequent requests // send only parameters in a binary form and meta information is - // discarded on the DB side, significantly saving network bandwith. + // discarded on the DB side, significantly saving network bandwidth. "SELECT value FROM key_value_table WHERE key=$1", key ); diff --git a/scripts/docs/en/userver/logging.md b/scripts/docs/en/userver/logging.md index e74d3465ee06..badcf6e4afc9 100644 --- a/scripts/docs/en/userver/logging.md +++ b/scripts/docs/en/userver/logging.md @@ -44,7 +44,7 @@ yaml log-level: WARNING ``` -Logging per line and file can be overriden at runtime using @ref USERVER_LOG_DYNAMIC_DEBUG dynamic config. +Logging per line and file can be overridden at runtime using @ref USERVER_LOG_DYNAMIC_DEBUG dynamic config. ### Dynamic change of the logging level diff --git a/scripts/tests/test_start_with_testsuite.sh b/scripts/tests/test_start_with_testsuite.sh index abb2e9b038a9..7ec3a08f36f8 100755 --- a/scripts/tests/test_start_with_testsuite.sh +++ b/scripts/tests/test_start_with_testsuite.sh @@ -18,7 +18,7 @@ PG_SERVICE_PID=$! ${BUILD_SYSTEM} start-userver-samples-hello_service & HELLO_SERVICE_PID=$! -# Disable exitting on error +# Disable exiting on error set +e while ! curl --max-time 1 'http://localhost:8080/hello'; do diff --git a/testsuite/pytest_plugins/pytest_userver/plugins/caches.py b/testsuite/pytest_plugins/pytest_userver/plugins/caches.py index 1a0cfa89225b..95868970f608 100644 --- a/testsuite/pytest_plugins/pytest_userver/plugins/caches.py +++ b/testsuite/pytest_plugins/pytest_userver/plugins/caches.py @@ -139,7 +139,7 @@ def query_caches( return staged, actions def commit_staged(self, staged: typing.Dict[str, typing.Any]) -> None: - """Apply recently commited state.""" + """Apply recently committed state.""" self._context.update(staged) diff --git a/testsuite/pytest_plugins/pytest_userver/plugins/dynamic_config.py b/testsuite/pytest_plugins/pytest_userver/plugins/dynamic_config.py index 9e60b11847cf..4e6d77913ae9 100644 --- a/testsuite/pytest_plugins/pytest_userver/plugins/dynamic_config.py +++ b/testsuite/pytest_plugins/pytest_userver/plugins/dynamic_config.py @@ -106,14 +106,14 @@ def is_empty(self) -> bool: class _Changelog: timestamp: datetime.datetime - commited_entries: typing.List[_ChangelogEntry] + committed_entries: typing.List[_ChangelogEntry] staged_entry: _ChangelogEntry def __init__(self): self.timestamp = datetime.datetime.fromtimestamp( 0, datetime.timezone.utc, ) - self.commited_entries = [] + self.committed_entries = [] self.staged_entry = _ChangelogEntry.new( timestamp=self.service_timestamp(), previous=None, ) @@ -126,14 +126,14 @@ def next_timestamp(self) -> str: return self.service_timestamp() def commit(self) -> _ChangelogEntry: - """Commit staged changed if any and return last commited entry.""" + """Commit staged changed if any and return last committed entry.""" entry = self.staged_entry - if entry.has_changes or not self.commited_entries: + if entry.has_changes or not self.committed_entries: self.staged_entry = _ChangelogEntry.new( timestamp=self.next_timestamp(), previous=entry, ) - self.commited_entries.append(entry) - return self.commited_entries[-1] + self.committed_entries.append(entry) + return self.committed_entries[-1] def get_updated_since( self, @@ -157,7 +157,7 @@ def _get_updated_since( return values, [] dirty_keys = set() last_known_state = {} - for entry in reversed(self.commited_entries): + for entry in reversed(self.committed_entries): if entry.timestamp > updated_since: dirty_keys.update(entry.dirty_keys) else: @@ -187,14 +187,14 @@ def rollback(self, defaults: ConfigDict): self._do_rollback(defaults) def _do_rollback(self, defaults: ConfigDict): - if not self.commited_entries: + if not self.committed_entries: return maybe_dirty = set() - for entry in self.commited_entries: + for entry in self.committed_entries: maybe_dirty.update(entry.dirty_keys) - last = self.commited_entries[-1] + last = self.committed_entries[-1] last_state = last.state dirty_keys = set() reverted = {} @@ -210,7 +210,7 @@ def _do_rollback(self, defaults: ConfigDict): dirty_keys=dirty_keys, prev_state={}, ) - self.commited_entries = [entry] + self.committed_entries = [entry] self.staged_entry = _ChangelogEntry( timestamp=self.staged_entry.timestamp, dirty_keys=dirty_keys.copy(), diff --git a/testsuite/pytest_plugins/pytest_userver/plugins/logging.py b/testsuite/pytest_plugins/pytest_userver/plugins/logging.py index efc1c48b79a4..f65e9f38d533 100644 --- a/testsuite/pytest_plugins/pytest_userver/plugins/logging.py +++ b/testsuite/pytest_plugins/pytest_userver/plugins/logging.py @@ -42,7 +42,7 @@ def readlines( for line, position in _raw_line_reader( self.path, self.position, eof_handler=eof_handler, ): - # userver does not give any gurantees about log file encoding + # userver does not give any guarantees about log file encoding line = line.decode(encoding='utf-8', errors='backslashreplace') if not first_skipped: first_skipped = True diff --git a/testsuite/pytest_plugins/pytest_userver/sql.py b/testsuite/pytest_plugins/pytest_userver/sql.py index 7fe00dda9a3f..993f1d895ea5 100644 --- a/testsuite/pytest_plugins/pytest_userver/sql.py +++ b/testsuite/pytest_plugins/pytest_userver/sql.py @@ -8,7 +8,7 @@ class RegisteredTrx: will throw an exception. If you don't need a fault injection anymore (e.g. you want to test - a successfull retry), you may call `disable_trx_failure` afterwards. + a successful retry), you may call `disable_trx_failure` afterwards. Example usage: @snippet integration_tests/tests/test_trx_failure.py fault injection