From 7cb3191ccb1dc24ff21a9e41ec30d52f420c98e6 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Thu, 17 Mar 2022 12:57:00 +0200 Subject: KDEClangFormat: se the same source file extensions in clang-format script and target Previously the clang-format.sh git hook script didn't specify the file extensions to format; however it looks like with recent(?) clang-format versions 'git clang-format' will consider .json files if such files were changed by a commit, which makes the script fail, see: https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/254 Sepcify the file extensions by passing --extensions to 'git clang-format' command. Also add ".hpp" to the file extensions we format, and use the same list of file extensions everywhere. --- kde-modules/KDEFrameworkCompilerLegacySettings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kde-modules/KDEFrameworkCompilerLegacySettings.cmake') diff --git a/kde-modules/KDEFrameworkCompilerLegacySettings.cmake b/kde-modules/KDEFrameworkCompilerLegacySettings.cmake index 192d079b..895291c0 100644 --- a/kde-modules/KDEFrameworkCompilerLegacySettings.cmake +++ b/kde-modules/KDEFrameworkCompilerLegacySettings.cmake @@ -76,6 +76,6 @@ endif() if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.80.0) include(KDEClangFormat) # add clang-format target - file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c) + file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) endif () -- cgit v1.2.1