-
Notifications
You must be signed in to change notification settings - Fork 617
[CODE HEALTH] Resolve multiple clang tidy warnings #4492
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
base: main
Are you sure you want to change the base?
Changes from all commits
cfdba33
813d479
a06b47b
b2b529d
f3bdf60
79cdcec
b986445
8d7bf6d
40723b9
b346f03
5306e9e
f118e24
d7afcde
45f4d4e
b311ee6
23d1f71
7a14394
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,14 +42,15 @@ TEST(ServiceDetectorUtilsTest, GetServiceNameFallbackUsesUnknownServicePrefix) | |
| { | ||
| unsetenv(kOtelServiceName); | ||
|
|
||
| const std::string service_name = detail::GetServiceName(); | ||
| if (service_name.rfind("unknown_service:", 0) == 0) | ||
| const std::string service_name = detail::GetServiceName(); | ||
| const std::string unknown_service_prefix = "unknown_service:"; | ||
| if (service_name.substr(0, unknown_service_prefix.size()) == unknown_service_prefix) | ||
| { | ||
| EXPECT_GT(service_name.size(), std::string{"unknown_service:"}.size()); | ||
| EXPECT_GT(service_name.size(), unknown_service_prefix.size()); | ||
|
Comment on lines
+45
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: is this due to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good feedback! Yes I think it is better to disable the |
||
| } | ||
| else | ||
| { | ||
| EXPECT_EQ(service_name, std::string{"unknown_service"}); | ||
| EXPECT_EQ(service_name, "unknown_service"); | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.