mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 14:50:54 +00:00
fix: clear the clang-tidy errors CI reported on this branch
All eleven were reproduced locally against the same checks before fixing. Six unused includes, left behind when the merge unioned two sets of includes and later edits removed their only users: algorithm, functional, numeric and thread in the job-queue test, and cstdint in the sync-state test and the load manager. Each verified unused by grepping for every symbol the header provides, so none is a still-needed include being dropped. The telemetry registry header included ranges for a std::ranges::all_of call, but that algorithm comes from algorithm, which the header already included. Two consteval handler-name loops became std::ranges::all_of, which reads as the predicate it is, and the two flagged fixtures are const. Also picks up the levelization baseline the check asked for: the consensus span-name test adds one edge from the libxrpl tests to xrpld.consensus, which is the exact line CI's diff requested. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <set>
|
||||
@@ -209,12 +210,9 @@ constexpr std::array kFoldToOtherHandlers = {
|
||||
consteval bool
|
||||
allPassThroughUnchanged()
|
||||
{
|
||||
for (auto const name : kPassThroughHandlers)
|
||||
{
|
||||
if (MetricsRegistry::sanitiseHandler(name) != name)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return std::ranges::all_of(kPassThroughHandlers, [](auto const name) {
|
||||
return MetricsRegistry::sanitiseHandler(name) == name;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,12 +221,9 @@ allPassThroughUnchanged()
|
||||
consteval bool
|
||||
allFoldToOther()
|
||||
{
|
||||
for (auto const name : kFoldToOtherHandlers)
|
||||
{
|
||||
if (MetricsRegistry::sanitiseHandler(name) != MetricsRegistry::kHandlerOther)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return std::ranges::all_of(kFoldToOtherHandlers, [](auto const name) {
|
||||
return MetricsRegistry::sanitiseHandler(name) == MetricsRegistry::kHandlerOther;
|
||||
});
|
||||
}
|
||||
|
||||
// Compile-time guarantees. Duplicated at runtime below so a failure names
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
|
||||
using namespace xrpl;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
Reference in New Issue
Block a user