Skip to content

Bump actions/download-artifact from 8.0.0 to 8.0.1 #254

Bump actions/download-artifact from 8.0.0 to 8.0.1

Bump actions/download-artifact from 8.0.0 to 8.0.1 #254

Workflow file for this run

name: Clang-format
on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
check-formatting:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format-17
- name: Run clang-format style check
run: |
# Find all C/C++ files, excluding include directory
files=$(find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) \
! -path "./include/*" ! -path "./.git/*" | sort)
if [ -z "$files" ]; then
echo "No C/C++ files found"
exit 0
fi
# Check formatting (--dry-run -Werror exits non-zero if changes needed)
echo "$files" | xargs clang-format-17 --verbose --dry-run -Werror --style=file --fallback-style=Microsoft