From 9ced2bf5c3cf0d8f74b26f1cfda42a525f53e838 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 31 Jan 2021 15:31:15 +0100 Subject: [PATCH] :construction_worker: add CI step for coverage --- .clang-tidy | 2 +- .github/workflows/ubuntu.yml | 6 +++++- include/nlohmann/detail/input/binary_reader.hpp | 4 ++-- include/nlohmann/json.hpp | 4 ++-- single_include/nlohmann/json.hpp | 8 ++++---- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 610b22839..5475b2024 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -41,4 +41,4 @@ CheckOptions: WarningsAsErrors: '*' #HeaderFilterRegex: '.*nlohmann.*' -HeaderFilterRegex: '.*\.hpp$' +HeaderFilterRegex: '.*/include/.*' diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 438cf4200..3e86b4219 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -120,13 +120,17 @@ jobs: ci_test_coverage: runs-on: ubuntu-latest - container: nlohmann/json-ci:latest + container: + image: nlohmann/json-ci:latest + options: -v /__w/json/json:/workdir steps: - uses: actions/checkout@v2 - name: cmake run: cmake -S . -B build -DJSON_CI=On - name: build run: cmake --build build --target ci_test_coverage + - name: copy + run: cp -r html /workdir ; cp -r json.info /workdir - name: archive coverage report uses: actions/upload-artifact@v2 with: diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 09b611485..1d994ed6d 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -78,9 +78,9 @@ class binary_reader // make class move-only binary_reader(const binary_reader&) = delete; - binary_reader(binary_reader&&) noexcept = default; + binary_reader(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) binary_reader& operator=(const binary_reader&) = delete; - binary_reader& operator=(binary_reader&&) noexcept = default; + binary_reader& operator=(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) ~binary_reader() = default; /*! diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 23169faef..06c66a695 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -1444,7 +1444,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec typename U = detail::uncvref_t, detail::enable_if_t < !detail::is_basic_json::value && detail::is_compatible_type::value, int > = 0 > - basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload) + basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape) JSONSerializer::to_json(std::declval(), std::forward(val)))) { @@ -8752,7 +8752,7 @@ struct less<::nlohmann::detail::value_t> @since version 1.0.0 */ template<> -inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( +inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name) is_nothrow_move_constructible::value&& // NOLINT(misc-redundant-expression) is_nothrow_move_assignable::value ) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index e59d8d603..e66f9e72b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -7834,9 +7834,9 @@ class binary_reader // make class move-only binary_reader(const binary_reader&) = delete; - binary_reader(binary_reader&&) noexcept = default; + binary_reader(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) binary_reader& operator=(const binary_reader&) = delete; - binary_reader& operator=(binary_reader&&) noexcept = default; + binary_reader& operator=(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) ~binary_reader() = default; /*! @@ -18092,7 +18092,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec typename U = detail::uncvref_t, detail::enable_if_t < !detail::is_basic_json::value && detail::is_compatible_type::value, int > = 0 > - basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload) + basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape) JSONSerializer::to_json(std::declval(), std::forward(val)))) { @@ -25400,7 +25400,7 @@ struct less<::nlohmann::detail::value_t> @since version 1.0.0 */ template<> -inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( +inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name) is_nothrow_move_constructible::value&& // NOLINT(misc-redundant-expression) is_nothrow_move_assignable::value )