Fix .clang format path
This commit is contained in:
parent
1f232b65e1
commit
4d62592839
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,7 @@ FILE_EXTS=("*.h" "*.cpp" "*.hpp" "*.c")
|
||||||
DRY_RUN=false
|
DRY_RUN=false
|
||||||
VERBOSE=false
|
VERBOSE=false
|
||||||
CHECK_MODIFIED=false
|
CHECK_MODIFIED=false
|
||||||
|
DEBUG=false
|
||||||
|
|
||||||
# Help text
|
# Help text
|
||||||
show_help() {
|
show_help() {
|
||||||
|
@ -98,7 +99,7 @@ main() {
|
||||||
|
|
||||||
${VERBOSE} && echo "📁 Fichiers à vérifier : ${#files[@]}"
|
${VERBOSE} && echo "📁 Fichiers à vérifier : ${#files[@]}"
|
||||||
|
|
||||||
local format_args=("-style=file" "${CLANG_CONFIG}")
|
local format_args=("-style=file:${CLANG_CONFIG}")
|
||||||
local errors=0
|
local errors=0
|
||||||
|
|
||||||
if [[ "${DRY_RUN}" == true ]]; then
|
if [[ "${DRY_RUN}" == true ]]; then
|
||||||
|
@ -114,6 +115,7 @@ for file in "${files[@]}"; do
|
||||||
[[ -z "$file" ]] && continue
|
[[ -z "$file" ]] && continue
|
||||||
${VERBOSE} && echo "🔎 Traitement : ${file}"
|
${VERBOSE} && echo "🔎 Traitement : ${file}"
|
||||||
|
|
||||||
|
${DEBUG} && echo "${CLANG_FORMAT_BIN}" "${format_args[@]}" "${file}"
|
||||||
if ! "${CLANG_FORMAT_BIN}" "${format_args[@]}" "${file}"; then
|
if ! "${CLANG_FORMAT_BIN}" "${format_args[@]}" "${file}"; then
|
||||||
((errors++))
|
((errors++))
|
||||||
${DRY_RUN} && echo "❌ Problème détecté : ${file}"
|
${DRY_RUN} && echo "❌ Problème détecté : ${file}"
|
||||||
|
|
Loading…
Reference in a new issue