diff --git a/.clang-tidy b/.clang-tidy index f374af30a4..87b6a42daa 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -67,6 +67,7 @@ Checks: "-*, bugprone-unhandled-self-assignment, bugprone-unique-ptr-array-mismatch, bugprone-unsafe-functions, + bugprone-unused-raii, bugprone-unused-local-non-trivial-variable, bugprone-virtual-near-miss, cppcoreguidelines-no-suspend-with-lock, diff --git a/src/test/jtx/Env_test.cpp b/src/test/jtx/Env_test.cpp index 6d151c27ce..1fdf4e6db3 100644 --- a/src/test/jtx/Env_test.cpp +++ b/src/test/jtx/Env_test.cpp @@ -39,9 +39,9 @@ public: a = std::move(b); Account c(std::move(a)); } - Account("alice"); - Account("alice", KeyType::secp256k1); - Account("alice", KeyType::ed25519); + Account("alice"); // NOLINT(bugprone-unused-raii) + Account("alice", KeyType::secp256k1); // NOLINT(bugprone-unused-raii) + Account("alice", KeyType::ed25519); // NOLINT(bugprone-unused-raii) auto const gw = Account("gw"); [](AccountID) {}(gw); auto const USD = gw["USD"]; @@ -56,11 +56,11 @@ public: { using namespace jtx; - PrettyAmount(0); - PrettyAmount(1); - PrettyAmount(0u); - PrettyAmount(1u); - PrettyAmount(-1); + PrettyAmount(0); // NOLINT(bugprone-unused-raii) + PrettyAmount(1); // NOLINT(bugprone-unused-raii) + PrettyAmount(0u); // NOLINT(bugprone-unused-raii) + PrettyAmount(1u); // NOLINT(bugprone-unused-raii) + PrettyAmount(-1); // NOLINT(bugprone-unused-raii) static_assert(!std::is_trivially_constructible::value, ""); static_assert(!std::is_trivially_constructible::value, ""); static_assert(!std::is_trivially_constructible::value, "");