mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-03 03:02:45 +00:00
Merge branch 'develop' into copilot/remove-non-canonical-fields
This commit is contained in:
@@ -10,6 +10,7 @@ Checks: "-*,
|
||||
bugprone-copy-constructor-init,
|
||||
bugprone-dangling-handle,
|
||||
bugprone-dynamic-static-initializers,
|
||||
bugprone-empty-catch,
|
||||
bugprone-fold-init-type,
|
||||
bugprone-forward-declaration-namespace,
|
||||
bugprone-inaccurate-erase,
|
||||
@@ -83,7 +84,6 @@ Checks: "-*,
|
||||
# ---
|
||||
# checks that have some issues that need to be resolved:
|
||||
#
|
||||
# bugprone-empty-catch,
|
||||
# bugprone-crtp-constructor-accessibility,
|
||||
# bugprone-inc-dec-in-conditions,
|
||||
# bugprone-reserved-identifier,
|
||||
|
||||
@@ -176,6 +176,8 @@ words:
|
||||
- nixfmt
|
||||
- nixos
|
||||
- nixpkgs
|
||||
- NOLINT
|
||||
- NOLINTNEXTLINE
|
||||
- nonxrp
|
||||
- noripple
|
||||
- nudb
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
{
|
||||
m_timer.cancel();
|
||||
}
|
||||
catch (boost::system::system_error const&)
|
||||
catch (boost::system::system_error const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
// close can throw and we don't want the destructor to throw.
|
||||
close();
|
||||
}
|
||||
catch (nudb::system_error const&)
|
||||
catch (nudb::system_error const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
// Don't allow exceptions to propagate out of destructors.
|
||||
// close() has already logged the error.
|
||||
|
||||
@@ -443,6 +443,7 @@ getRate(STAmount const& offerOut, STAmount const& offerIn)
|
||||
{
|
||||
if (offerOut == beast::zero)
|
||||
return 0;
|
||||
|
||||
try
|
||||
{
|
||||
STAmount r = divide(offerIn, offerOut, noIssue());
|
||||
@@ -454,12 +455,11 @@ getRate(STAmount const& offerOut, STAmount const& offerIn)
|
||||
std::uint64_t ret = r.exponent() + 100;
|
||||
return (ret << (64 - 8)) | r.mantissa();
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (...)
|
||||
{
|
||||
// overflow -- very bad offer
|
||||
return 0;
|
||||
}
|
||||
|
||||
// overflow -- very bad offer
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -246,10 +246,10 @@ STTx::checkSign(Rules const& rules, STObject const& sigObject) const
|
||||
return signingPubKey.empty() ? checkMultiSign(rules, sigObject)
|
||||
: checkSingleSign(sigObject);
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (...)
|
||||
{
|
||||
return Unexpected("Internal signature check failure.");
|
||||
}
|
||||
return Unexpected("Internal signature check failure.");
|
||||
}
|
||||
|
||||
Expected<void, std::string>
|
||||
|
||||
@@ -1126,8 +1126,8 @@ toClaim(STTx const& tx)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template <class TAttestation>
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
{
|
||||
setupDatabaseDir(getDatabasePath());
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
{
|
||||
cleanupDatabaseDir(getDatabasePath());
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
{
|
||||
setupDatabaseDir(getDatabasePath());
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
{
|
||||
cleanupDatabaseDir(getDatabasePath());
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,10 +587,10 @@ Env::st(JTx const& jt)
|
||||
{
|
||||
return sterilize(STTx{std::move(*obj)});
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (...)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<STTx const>
|
||||
@@ -613,10 +613,10 @@ Env::ust(JTx const& jt)
|
||||
{
|
||||
return std::make_shared<STTx const>(std::move(*obj));
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (...)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
|
||||
@@ -339,8 +339,8 @@ validDocumentID(AnyValue const& v)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace oracle
|
||||
|
||||
@@ -107,6 +107,7 @@ class WSClientImpl : public WSClient
|
||||
{
|
||||
stream_.cancel();
|
||||
}
|
||||
// NOLINTNEXTLINE(bugprone-empty-catch)
|
||||
catch (boost::system::system_error const&)
|
||||
{
|
||||
// ignored
|
||||
|
||||
@@ -35,7 +35,7 @@ TEST(scope, scope_exit)
|
||||
scope_exit x{[&i]() { i = 5; }};
|
||||
throw 1;
|
||||
}
|
||||
catch (...)
|
||||
catch (...) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ TEST(scope, scope_exit)
|
||||
x.release();
|
||||
throw 1;
|
||||
}
|
||||
catch (...)
|
||||
catch (...) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ TEST(scope, scope_fail)
|
||||
scope_fail x{[&i]() { i = 5; }};
|
||||
throw 1;
|
||||
}
|
||||
catch (...)
|
||||
catch (...) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ TEST(scope, scope_fail)
|
||||
x.release();
|
||||
throw 1;
|
||||
}
|
||||
catch (...)
|
||||
catch (...) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,7 @@ TEST(scope, scope_success)
|
||||
scope_success x{[&i]() { i = 5; }};
|
||||
throw 1;
|
||||
}
|
||||
catch (...)
|
||||
catch (...) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ TEST(scope, scope_success)
|
||||
x.release();
|
||||
throw 1;
|
||||
}
|
||||
catch (...)
|
||||
catch (...) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
newNode->getHash().as_uint256(), std::make_shared<Blob>(s.begin(), s.end()));
|
||||
}
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1637,7 +1637,7 @@ LedgerMaster::getLedgerBySeq(std::uint32_t index)
|
||||
if (hash)
|
||||
return mLedgerHistory.getLedgerByHash(*hash);
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
// Missing nodes are already handled
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ SkipListAcquire::processData(
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
catch (...) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ getEndpoint(std::string const& peer)
|
||||
if (endpoint)
|
||||
return beast::IP::to_asio_endpoint(endpoint.value());
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
return {};
|
||||
|
||||
@@ -177,7 +177,7 @@ ValidatorSite::stop()
|
||||
{
|
||||
timer_.cancel();
|
||||
}
|
||||
catch (boost::system::system_error const&)
|
||||
catch (boost::system::system_error const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
stopping_ = false;
|
||||
@@ -222,7 +222,7 @@ ValidatorSite::makeRequest(
|
||||
{
|
||||
timer_.cancel_one();
|
||||
}
|
||||
catch (boost::system::system_error const&)
|
||||
catch (boost::system::system_error const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -252,7 +252,7 @@ ConnectAttempt::cancelTimer()
|
||||
timer_.cancel();
|
||||
stepTimer_.cancel();
|
||||
}
|
||||
catch (boost::system::system_error const&)
|
||||
catch (boost::system::system_error const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
@@ -1479,7 +1479,7 @@ rpcClient(
|
||||
setup = setup_ServerHandler(
|
||||
config, beast::logstream{logs.journal("HTTPClient").warn()});
|
||||
}
|
||||
catch (std::exception const&)
|
||||
catch (std::exception const&) // NOLINT(bugprone-empty-catch)
|
||||
{
|
||||
// ignore any exceptions, so the command
|
||||
// line client works without a config file
|
||||
|
||||
Reference in New Issue
Block a user