light/tools/ci/steps/style.sh
light7734 144ca1aa4f
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build encountered an error
refactor: extract shell commands from .drone.yml to separate script files
2025-07-20 07:38:46 +03:30

18 lines
406 B
Bash
Executable file

#!/bin/bash
set -e
has_fomatting_issues=0
for file in $(find ./modules -name '*.?pp'); do
echo "Checking format for $file"
if ! clang-format --dry-run --Werror "$file"; then
echo "❌ Formatting issue detected in $file"
has_fomatting_issues=1
fi
done
if [ "$has_fomatting_issues" -eq 0 ]; then
echo "✅ All files are properly formatted! Well done! ^~^"
fi
exit ${has_fomatting_issues}