build: enabled header diagnostics in clang-tidy

This commit is contained in:
Pirogov, Vadim
2025-01-02 15:29:57 -08:00
committed by Vadim Pirogov
parent 23321c91c9
commit e3f136f8ec
4 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,7 @@
HeaderFilterRegex: '/(examples|include|src|tests)/.*\.hpp'
FormatStyle: file
Checks: >
-*,
readability-identifier-naming,

View File

@ -349,7 +349,8 @@ elseif(UNIX OR MINGW)
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY})
message(STATUS "Using clang-tidy to run checks")
elseif(DNNL_USE_CLANG_TIDY STREQUAL "FIX")
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY} -fix)
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY}
-fix)
message(STATUS "Using clang-tidy to run checks and fix found issues")
endif()
endif()

View File

@ -0,0 +1,3 @@
Checks: '-*,misc-definitions-in-headers'
CheckOptions:
- { key: HeaderFileExtensions, value: "x" }

View File

@ -0,0 +1,3 @@
Checks: '-*,misc-definitions-in-headers'
CheckOptions:
- { key: HeaderFileExtensions, value: "x" }