chore: Fix clang-tidy#3061
Open
godexsoft wants to merge 1 commit intoXRPLF:developfrom
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3061 +/- ##
========================================
Coverage 81.98% 81.98%
========================================
Files 396 396
Lines 16024 16024
Branches 8376 8376
========================================
Hits 13137 13137
Misses 1677 1677
Partials 1210 1210 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mathbunnyru
requested changes
May 4, 2026
| @@ -22,7 +22,6 @@ TEST_F(DeprecatedTests, Field) | |||
| { | |||
| auto warning = Deprecated<>::check(json, "some_string"); | |||
| ASSERT_TRUE(warning); | |||
Collaborator
There was a problem hiding this comment.
Let's replace this with .has_value() in this file
| return lhs.error < rhs.error; | ||
| }); | ||
| ASSERT_TRUE(result.has_value()); | ||
| // NOLINTBEGIN(bugprone-unchecked-optional-access) |
Collaborator
There was a problem hiding this comment.
This looks like it could also be deleted.
I think it's worth searching for remaining bugprone-unchecked-optional-access and checking that they are needed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the remaining issues clang-tidy found in CI. Also it attempts to improve the amount of NOLINTS we need for optional checks. According to the docs this should work. ASSERT_TRUE(has_value()) should be marked as 'safe' for optional access check.