From a1effcb7e804d9e01ae4099f1a95a63529c7bc7b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 29 Aug 2021 13:33:33 +0200 Subject: [PATCH] :wrench: adjust flags --- .clang-tidy | 2 ++ cmake/ci.cmake | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index a28335936..1a7a4c065 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,5 @@ Checks: '*, + -altera-struct-pack-align, -android-cloexec-fopen, -cppcoreguidelines-avoid-goto, -cppcoreguidelines-avoid-magic-numbers, @@ -30,6 +31,7 @@ Checks: '*, -misc-non-private-member-variables-in-classes, -modernize-use-trailing-return-type, -readability-function-size, + -readability-function-cognitive-complexity, -readability-magic-numbers, -readability-redundant-access-specifiers, -readability-uppercase-literal-suffix' diff --git a/cmake/ci.cmake b/cmake/ci.cmake index d76f48b19..f748c760c 100644 --- a/cmake/ci.cmake +++ b/cmake/ci.cmake @@ -79,7 +79,7 @@ message(STATUS "🔖 Valgrind ${VALGRIND_TOOL_VERSION} (${VALGRIND_TOOL})") find_program(GENHTML_TOOL NAMES genhtml) find_program(PLOG_CONVERTER_TOOL NAMES plog-converter) find_program(PVS_STUDIO_ANALYZER_TOOL NAMES pvs-studio-analyzer) -find_program(SCAN_BUILD_TOOL NAMES scan-build-11 scan-build) +find_program(SCAN_BUILD_TOOL NAMES scan-build-12 scan-build-11 scan-build) # the individual source files file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp) @@ -96,6 +96,7 @@ file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp) # -Wno-padded We do not care about padding warnings. # -Wno-covered-switch-default All switches list all cases and a default case. # -Wno-weak-vtables The library is header-only. +# -Wreserved-identifier See https://github.com/onqtam/doctest/issues/536. set(CLANG_CXXFLAGS "-std=c++11 \ -Werror \ @@ -107,6 +108,7 @@ set(CLANG_CXXFLAGS "-std=c++11 \ -Wno-padded \ -Wno-covered-switch-default \ -Wno-weak-vtables \ + -Wno-reserved-identifier \ ") # Ignored GCC warnings: