Skip to content

Commit d8dbdbf

Browse files
authored
🔥 Remove clang-tidy again (#32)
clang-tidy is very annoying to work with in cmake. Adding any sort of flags that it doesn't understand results in breakages everywhere. Rather than deal with clang-tidy, I'll push developers to call clangd-tidy directly. And have CI execute clangd-tidy as well. clangd-tidy runs clang-tidy via clangd which strips away all commands not meant for LLVM.
1 parent 00972b8 commit d8dbdbf

File tree

2 files changed

+1
-35
lines changed

2 files changed

+1
-35
lines changed

cmake/build.cmake

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,40 +36,6 @@ add_custom_target(copy_compile_commands ALL
3636
# Colored LIBHAL text
3737
set(LIBHAL_TITLE "${BoldMagenta}[LIBHAL]:${ColourReset}")
3838

39-
if(WIN32)
40-
# Disable clang-tidy for Windows builds
41-
set(CMAKE_CXX_CLANG_TIDY "")
42-
else()
43-
# Find clang-tidy "clang-tidy"
44-
find_program(LIBHAL_CLANG_TIDY_PROGRAM
45-
NAMES "clang-tidy-18" "clang-tidy-17" "clang-tidy"
46-
DOC "Path to clang-tidy executable")
47-
48-
if(NOT LIBHAL_CLANG_TIDY_PROGRAM)
49-
message(STATUS "${LIBHAL_TITLE} clang-tidy not found.")
50-
else()
51-
# Set clang-tidy as a CXX language standard option
52-
message(STATUS "${LIBHAL_TITLE} ${LIBHAL_CLANG_TIDY_PROGRAM} AVAILABLE!")
53-
set(LIBHAL_CLANG_TIDY_CONFIG_FILE
54-
"${LIBHAL_SCRIPT_PATH}/clang-tidy.conf")
55-
set(LIBHAL_CLANG_TIDY "${LIBHAL_CLANG_TIDY_PROGRAM}"
56-
"--config-file=${LIBHAL_CLANG_TIDY_CONFIG_FILE}")
57-
endif()
58-
endif()
59-
60-
# Adds clang tidy check to target for host builds (skipped if a cross build)
61-
function(_libhal_add_clang_tidy_check TARGET)
62-
if(${CMAKE_CROSSCOMPILING})
63-
message(STATUS "${LIBHAL_TITLE} Cross compiling, skipping clang-tidy checks for \"${TARGET}\"")
64-
elseif(WIN32)
65-
message(STATUS "${LIBHAL_TITLE} Windows has issues with clang-tidy, skipping clang-tidy checks for \"${TARGET}\"")
66-
else()
67-
set(CMAKE_CXX_CLANG_TIDY ${LIBHAL_CLANG_TIDY_PROGRAM})
68-
set_target_properties(${TARGET} PROPERTIES CXX_CLANG_TIDY
69-
"${LIBHAL_CLANG_TIDY}")
70-
endif()
71-
endfunction()
72-
7339
function(libhal_make_library)
7440
# Parse CMake function arguments
7541
set(options USE_CLANG_TIDY)

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
class libhal_cmake_util_conan(ConanFile):
2525
name = "libhal-cmake-util"
26-
version = "4.2.0"
26+
version = "4.3.0"
2727
license = "Apache-2.0"
2828
homepage = "https://libhal.github.io/libhal-armcortex"
2929
description = ("A collection of CMake scripts for ARM Cortex ")

0 commit comments

Comments
 (0)