From 6413f31d8e0287d47332ccc52bcde236307e6487 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 31 Jan 2021 12:41:16 +0100 Subject: [PATCH] :construction_worker: add CI step for coverage --- .clang-tidy | 3 ++- .github/workflows/ubuntu.yml | 7 ++++++- include/nlohmann/detail/input/lexer.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 4122a9ec1..9c1e74231 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -38,4 +38,5 @@ CheckOptions: - key: hicpp-special-member-functions.AllowSoleDefaultDtor value: 1 -HeaderFilterRegex: '.*nlohmann.*' +#HeaderFilterRegex: '.*nlohmann.*' +HeaderFilterRegex: '^(.*doctest.h)$' diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 74423010f..817672396 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -106,7 +106,7 @@ jobs: - name: cmake run: cmake -S . -B build -DJSON_CI=On - name: build - run: cmake --build build --target ci_clang_tidy || true + run: cmake --build build --target ci_clang_tidy ci_test_clang_sanitizer: runs-on: ubuntu-latest @@ -127,3 +127,8 @@ jobs: run: cmake -S . -B build -DJSON_CI=On - name: build run: cmake --build build --target ci_test_coverage + - name: archive coverage report + uses: actions/upload-artifact@v2 + with: + name: code-coverage-report + path: build_coverage/html diff --git a/include/nlohmann/detail/input/lexer.hpp b/include/nlohmann/detail/input/lexer.hpp index f822a2097..7db272261 100644 --- a/include/nlohmann/detail/input/lexer.hpp +++ b/include/nlohmann/detail/input/lexer.hpp @@ -120,9 +120,9 @@ class lexer : public lexer_base // delete because of pointer members lexer(const lexer&) = delete; - lexer(lexer&&) noexcept = default; + lexer(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) lexer& operator=(lexer&) = delete; - lexer& operator=(lexer&&) noexcept = default; + lexer& operator=(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) ~lexer() = default; private: diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 072927be4..e59d8d603 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -6117,9 +6117,9 @@ class lexer : public lexer_base // delete because of pointer members lexer(const lexer&) = delete; - lexer(lexer&&) noexcept = default; + lexer(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) lexer& operator=(lexer&) = delete; - lexer& operator=(lexer&&) noexcept = default; + lexer& operator=(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) ~lexer() = default; private: