Skip to content

Bump github/codeql-action/analyze from 4.36.2 to 4.36.3 #301

Bump github/codeql-action/analyze from 4.36.2 to 4.36.3

Bump github/codeql-action/analyze from 4.36.2 to 4.36.3 #301

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@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- 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