Configure clang-tidy CI check (#1028)

This commit is contained in:
Siarhei Fedartsou
2023-04-20 09:57:25 +02:00
committed by GitHub
parent f03deb7032
commit 2a7a6f01a2
27 changed files with 200 additions and 31 deletions

View File

@@ -1,2 +1,31 @@
Checks: 'modernize-*,-modernize-use-equals-delete,-modernize-use-equals-default,misc-static-assert,llvm-namespace-comment,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.uninitialized.UndefReturn,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-core.CallAndMessage,-clang-diagnostic-unused-command-line-argument,-clang-analyzer-core.uninitialized.*,-clang-analyzer-core.NullDereference,-clang-analyzer-core.NonNullParamChecker'
HeaderFilterRegex: '\/mbgl\/'
---
Checks: >
modernize-*,
-modernize-avoid-bind,
-modernize-avoid-c-arrays,
-modernize-concat-nested-namespaces,
-modernize-macro-to-enum,
-modernize-pass-by-value,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-emplace,
-modernize-use-equals-default,
-modernize-use-equals-delete,
-modernize-use-nodiscard,
-modernize-use-nullptr,
-modernize-use-override,
-modernize-use-trailing-return-type,
misc-static-assert,
-clang-analyzer-security.insecureAPI.rand,
-clang-analyzer-core.uninitialized.UndefReturn,
-clang-analyzer-core.StackAddressEscape,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-deadcode.DeadStores,
-clang-diagnostic-unused-command-line-argument,
-clang-analyzer-core.uninitialized.*,
-clang-analyzer-core.NullDereference,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-optin.cplusplus.UninitializedObject
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'

View File

@@ -237,3 +237,7 @@ if(WIN32)
endif()
set_property(TARGET mbgl-test PROPERTY FOLDER Core)
if (MBGL_WITH_CLANG_TIDY)
set_target_properties(mbgl-test PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
endif()

View File

@@ -53,7 +53,7 @@
namespace httplib {
class Server;
}
} // namespace httplib
namespace mbgl {
namespace test {

View File

@@ -1,7 +1,7 @@
#include <mbgl/util/bounding_volumes.hpp>
#include <gtest/gtest.h>
#include <math.h>
#include <cmath>
#include <algorithm>
using namespace mbgl;