Skip to content

chore: Fix clang-tidy#3061

Open
godexsoft wants to merge 1 commit intoXRPLF:developfrom
godexsoft:chore/clang-tidy-21-fixes
Open

chore: Fix clang-tidy#3061
godexsoft wants to merge 1 commit intoXRPLF:developfrom
godexsoft:chore/clang-tidy-21-fixes

Conversation

@godexsoft
Copy link
Copy Markdown
Collaborator

@godexsoft godexsoft commented May 2, 2026

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.98%. Comparing base (9b20f18) to head (ed5b5e9).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@godexsoft godexsoft requested review from kuznetsss and mathbunnyru May 2, 2026 18:48
@@ -22,7 +22,6 @@ TEST_F(DeprecatedTests, Field)
{
auto warning = Deprecated<>::check(json, "some_string");
ASSERT_TRUE(warning);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants