fast_float/format_code.sh
2026-08-19 17:01:19 +03:00

11 lines
449 B
Bash

#!/bin/bash
echo "Formatting all C/C++ files recursively..."
# Find and format files using an optimized execution loop
find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -o -name "*.cc" -o -name "*.c" \) -exec echo "Formatting: {}" \; -exec clang-format -style=file -i {} \;
echo "Formatting complete!"
# Pause analog: waits for a single keypress (-n 1) and hides the input (-s)
echo "Press any key to continue . . ."
read -n 1 -s -r