diff --git a/format_code.sh b/format_code.sh index 90347d4..bbc7ebd 100644 --- a/format_code.sh +++ b/format_code.sh @@ -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}"