Fix .clang format path

This commit is contained in:
Lucas 2025-03-05 23:57:46 +01:00
parent 1f232b65e1
commit 4d62592839

View file

@ -12,6 +12,7 @@ FILE_EXTS=("*.h" "*.cpp" "*.hpp" "*.c")
DRY_RUN=false
VERBOSE=false
CHECK_MODIFIED=false
DEBUG=false
# Help text
show_help() {
@ -98,7 +99,7 @@ main() {
${VERBOSE} && echo "📁 Fichiers à vérifier : ${#files[@]}"
local format_args=("-style=file" "${CLANG_CONFIG}")
local format_args=("-style=file:${CLANG_CONFIG}")
local errors=0
if [[ "${DRY_RUN}" == true ]]; then
@ -114,6 +115,7 @@ for file in "${files[@]}"; do
[[ -z "$file" ]] && continue
${VERBOSE} && echo "🔎 Traitement : ${file}"
${DEBUG} && echo "${CLANG_FORMAT_BIN}" "${format_args[@]}" "${file}"
if ! "${CLANG_FORMAT_BIN}" "${format_args[@]}" "${file}"; then
((errors++))
${DRY_RUN} && echo "❌ Problème détecté : ${file}"