<commit_before>
find_program(CLANG_FORMAT_EXE clang-format DOC "Clang Format executable")

if( CLANG_FORMAT_EXE )
    set(FORMAT_SOURCE_DIRS demos include src test tests)

    add_custom_target(format
                        find ${FORMAT_SOURCE_DIRS} -name "*.h" -o -name "*.cpp" | xargs
                            ${CLANG_FORMAT_EXE} -i ${FORMAT_SOURCES}
                        WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
                        COMMENT "Formatting Code"
                        VERBATIM
                        )
endif()

<commit_msg>Clang format handling of subdirectories fixed.<commit_after>
find_program(CLANG_FORMAT clang-format DOC "Clang Format executable")

if( CLANG_FORMAT )

    file(GLOB_RECURSE FORMAT_SRC_FILES
            "${PROJECT_SOURCE_DIR}/include/**.h"
            "${PROJECT_SOURCE_DIR}/src/**.h"
            "${PROJECT_SOURCE_DIR}/src/**.cpp"
            "${PROJECT_SOURCE_DIR}/test/**.h"
            "${PROJECT_SOURCE_DIR}/test/**.cpp"
            )

    add_custom_target(clang-format COMMAND ${CLANG_FORMAT} -i ${FORMAT_SRC_FILES})
endif()


{'fraction_non_alphanumeric': 0.10875576036866359, 'fraction_numerical': 0.0, 'mean_word_length': 2.232142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5735220', 'n_tokens_mistral': 347, 'n_tokens_neox': 330, 'n_words': 61}