A high-performance inference engine for AI models
fix clang format script (#286)
uuuvnd052f4240224
diff --git a/scripts/clang-format.sh b/scripts/clang-format.shindex 1295a4fcb..47df45edd 100755--- a/scripts/clang-format.sh+++ b/scripts/clang-format.sh@@ -25,19 +25,16 @@ if [[ "${1:-}" == "--check" ]]; thenMODE="check"fi-# Files to consider (zsh/bash compatible)+# Files to consider:+# - tracked files from git+# - untracked files that are not ignoredFILES=()while IFS= read -r -d '' file; doFILES+=("$file")-done < <(find . \- -path './target' -prune -o \- -path './external' -prune -o \- -path './.git' -prune -o \- -type f \( \- -name '*.h' -o -name '*.hpp' -o -name '*.hh' -o \- -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o \- -name '*.metal' \- \) -print0)+done < <(git ls-files -z --cached --others --exclude-standard -- \+ '*.h' '*.hpp' '*.hh' \+ '*.c' '*.cc' '*.cpp' \+ '*.metal')if [[ ${#FILES[@]} -eq 0 ]]; thenecho "No files to format."