Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Code health] Remove Unicode Text from Source files #2707

Merged
merged 7 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/include/opentelemetry/baggage/baggage.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright The OpenTelemetry Authors
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/context/context.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright The OpenTelemetry Authors
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/context/runtime_context.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright The OpenTelemetry Authors
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion ext/test/http/url_parser_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ TEST(UrlDecoderTests, BasicTests)
std::map<std::string, std::string> testdata{
{"Authentication=Basic xxx", "Authentication=Basic xxx"},
{"Authentication=Basic%20xxx", "Authentication=Basic xxx"},
{"%C3%B6%C3%A0%C2%A7%C3%96abcd%C3%84", "öà§ÖabcdÄ"},
{"%C3%B6%C3%A0%C2%A7%C3%96abcd%C3%84",
"\xc3\xb6\xc3\xa0\xc2\xa7\xc3\x96\x61\x62\x63\x64\xc3\x84"},
{"%2x", "%2x"},
{"%20", " "},
{"text%2", "text%2"},
Expand Down
2 changes: 1 addition & 1 deletion opentracing-shim/src/span_shim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void SpanShim::Log(opentracing::SystemTime timestamp,
void SpanShim::logImpl(nostd::span<const EventEntry> fields,
const opentracing::SystemTime *const timestamp) noexcept
{
// The Add Events name parameter MUST be the value with the event key
// The Add Event's name parameter MUST be the value with the event key
// in the pair set, or else fallback to use the log literal string.
const auto &event = std::find_if(fields.begin(), fields.end(),
[](const EventEntry &item) { return item.first == "event"; });
Expand Down
10 changes: 5 additions & 5 deletions sdk/test/metrics/instrument_metadata_validator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ TEST(InstrumentMetadataValidator, TestName)
{
opentelemetry::sdk::metrics::InstrumentMetaDataValidator validator;
std::vector<std::string> invalid_names = {
"", // empty string
"1sdf", // string starting with number
"123€AAA€BBB", // unicode characters
"", // empty string
"1sdf", // string starting with number
"\x31\x32\x33\xe2\x82\xac\x41\x41\x41\xe2\x82\xac\x42\x42\x42" // unicode characters
"/\\sdsd", // string starting with special character
"***sSSs", // string starting with special character
"a\\broken\\path", // contains backward slash
CreateVeryLargeString(25) + "X", // total 256 characters
CreateVeryLargeString(26), // string much bigger than 255 characters
CreateVeryLargeString(26), // string much bigger than 255 character
};
for (auto const &str : invalid_names)
{
Expand Down Expand Up @@ -56,7 +56,7 @@ TEST(InstrumentMetadataValidator, TestUnit)
std::vector<std::string> invalid_units = {
CreateVeryLargeString(5) + "ABCERTYGJ", // total 64 charactes
CreateVeryLargeString(7), // string bigger than 63 chars
"123€AAA€BBB", // unicode string
"\x31\x32\x33\xe2\x82\xac\x41\x41\x41\xe2\x82\xac\x42\x42\x42", // unicode string
};
for (auto const &str : invalid_units)
{
Expand Down
Loading