🚨 suppress Clang-Tidy warnings

This commit is contained in:
Niels Lohmann 2022-04-06 12:34:56 +02:00
parent ba6307a6ea
commit d1870f9869
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
3 changed files with 11 additions and 11 deletions

View File

@ -47,9 +47,9 @@ SOFTWARE.
#endif
#endif
#define NLOHMANN_JSON_VERSION_MAJOR 3
#define NLOHMANN_JSON_VERSION_MINOR 10
#define NLOHMANN_JSON_VERSION_PATCH 5
#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_MINOR 10 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_PATCH 5 // NOLINT(modernize-macro-to-enum)
#include <algorithm> // all_of, find, for_each
#include <cstddef> // nullptr_t, ptrdiff_t, size_t
@ -827,7 +827,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
/// @brief create a null object
/// @sa https://json.nlohmann.me/api/basic_json/basic_json/
basic_json(std::nullptr_t = nullptr) noexcept
basic_json(std::nullptr_t = nullptr) noexcept // NOLINT(bugprone-exception-escape)
: basic_json(value_t::null)
{
assert_invariant();

View File

@ -47,9 +47,9 @@ SOFTWARE.
#endif
#endif
#define NLOHMANN_JSON_VERSION_MAJOR 3
#define NLOHMANN_JSON_VERSION_MINOR 10
#define NLOHMANN_JSON_VERSION_PATCH 5
#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_MINOR 10 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_PATCH 5 // NOLINT(modernize-macro-to-enum)
#include <algorithm> // all_of, find, for_each
#include <cstddef> // nullptr_t, ptrdiff_t, size_t
@ -18021,7 +18021,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
/// @brief create a null object
/// @sa https://json.nlohmann.me/api/basic_json/basic_json/
basic_json(std::nullptr_t = nullptr) noexcept
basic_json(std::nullptr_t = nullptr) noexcept // NOLINT(bugprone-exception-escape)
: basic_json(value_t::null)
{
assert_invariant();

View File

@ -49,7 +49,7 @@ struct bad_allocator : std::allocator<T>
};
} // namespace
TEST_CASE("bad_alloc")
TEST_CASE("bad_alloc") // NOLINT(cert-err58-cpp)
{
SECTION("bad_alloc")
{
@ -132,7 +132,7 @@ void my_allocator_clean_up(T* p)
}
} // namespace
TEST_CASE("controlled bad_alloc")
TEST_CASE("controlled bad_alloc") // NOLINT(cert-err58-cpp)
{
// create JSON type using the throwing allocator
using my_json = nlohmann::basic_json<std::map,
@ -255,7 +255,7 @@ struct allocator_no_forward : std::allocator<T>
};
} // namespace
TEST_CASE("bad my_allocator::construct")
TEST_CASE("bad my_allocator::construct") // NOLINT(cert-err58-cpp)
{
SECTION("my_allocator::construct doesn't forward")
{