mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 02:07:07 +00:00
refactor: Add simple clang-tidy readability checks (#6556)
This change enables the following clang-tidy checks: - readability-avoid-nested-conditional-operator, - readability-avoid-return-with-void-value, - readability-braces-around-statements, - readability-const-return-type, - readability-container-contains, - readability-container-size-empty, - readability-else-after-return, - readability-make-member-function-const, - readability-redundant-casting, - readability-redundant-inline-specifier, - readability-redundant-member-init, - readability-redundant-string-init, - readability-reference-to-constructed-temporary, - readability-static-definition
This commit is contained in:
@@ -30,10 +30,12 @@ class LedgerRPC_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(jv[jss::error_message] == Json::nullValue || jv[jss::error_message] == "");
|
||||
}
|
||||
else if (BEAST_EXPECT(jv.isMember(jss::error_message)))
|
||||
{
|
||||
BEAST_EXPECTS(
|
||||
jv[jss::error_message] == msg,
|
||||
"Expected error message \"" + msg + "\", received \"" +
|
||||
jv[jss::error_message].asString() + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
// Corrupt a valid address by replacing the 10th character with '!'.
|
||||
@@ -634,15 +636,19 @@ class LedgerRPC_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(jrr[jss::ledger][jss::accountState].isArray());
|
||||
|
||||
for (auto i = 0; i < jrr[jss::ledger][jss::accountState].size(); i++)
|
||||
{
|
||||
if (jrr[jss::ledger][jss::accountState][i]["LedgerEntryType"] == jss::LedgerHashes)
|
||||
{
|
||||
index = jrr[jss::ledger][jss::accountState][i]["index"].asString();
|
||||
hashesLedgerEntryIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto const& object : jrr[jss::ledger][jss::accountState])
|
||||
{
|
||||
if (object["LedgerEntryType"] == jss::LedgerHashes)
|
||||
index = object["index"].asString();
|
||||
}
|
||||
|
||||
// jss::type is a deprecated field
|
||||
BEAST_EXPECT(
|
||||
|
||||
Reference in New Issue
Block a user