Compare commits

..

1 Commits

Author SHA1 Message Date
59d1062733 Fix workflow
Some checks failed
CI / Linux (debian) (pull_request) Has been cancelled
CI / Linux (fedora) (pull_request) Has been cancelled
CI / Linux (ubuntu) (pull_request) Has been cancelled
CI / Check spelling (pull_request) Has been cancelled
CI / Linux (arch) (pull_request) Has been cancelled
CI / Check coding style (pull_request) Failing after 29s
2025-06-20 14:33:21 +02:00

View File

@@ -49,17 +49,20 @@ jobs:
- name: Run clang-format check
run: |
echo $(clang-format --version)
# Find all source files you care about
INCLUDE_REGEX='^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(ino|pde|proto|cu))$'
CHECK_PATH='src'
files=$(find "$CHECK_PATH" -name .git -prune -o -regextype posix-egrep -regex "$INCLUDE_REGEX" -print)
if [ -z "$files" ]; then
echo "✅ No source files found to check."
exit 0
fi
# Run clang-format in dry-run mode and collect any improperly formatted files
failed=0
for file in $files; do
output=$(clang-format --dry-run --Werror --style=file "$file" 2>&1)
status=$?
if [ $status -ne 0 ]; then
if ! output=$(clang-format --dry-run --Werror --style=file "$file" 2>&1); then
echo "❌ Failed on file: $file"
echo "$output"
echo "----------------------------------------"
@@ -67,8 +70,12 @@ jobs:
fi
done
# Exit with 1 if any formatting issues were found
exit $failed
if [ $failed -ne 0 ]; then
echo "🚫 One or more files are not properly formatted."
exit $failed
else
echo "✅ All files are properly formatted."
fi
spell-check:
runs-on: ubuntu-22.04