Skip to content

Commit

Permalink
tools: format source files in parallel
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Cornu <[email protected]>
  • Loading branch information
mdcornu authored and pablodelara committed Jun 6, 2024
1 parent 0231d31 commit 496255c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ if [ $(clang_format_version) -ge $clang_format_min_version ]; then
echo "Formatting files using clang-format v$(clang_format_version)..."
for f in `git ls-files '*.[c|h]'`; do
[ "$verbose" -gt 0 ] && echo "formatting $f"
$clang_format -style=file -i "$f"
$clang_format -style=file -i "$f" &
done
else
echo "clang-format version ${clang_format_min_version}+ is required!"
fi

# wait for background processes to finish
wait

0 comments on commit 496255c

Please sign in to comment.