Skip to content

Add removeElementData client side #1034

Add removeElementData client side

Add removeElementData client side #1034

Workflow file for this run

name: clang-format
on: [push, pull_request, workflow_dispatch]
jobs:
clang-format:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run clang-format
id: clang_format
continue-on-error: true
shell: pwsh
run: ./utils/clang-format.ps1 -Verbose
- name: Auto-fix formatting issues
if: |
steps.clang_format.outcome == 'failure' &&
github.ref == 'refs/heads/master' &&
github.event_name == 'push'
shell: bash
run: |
# Stage the formatted files (clang-format.ps1 already ran in-place)
git add -u
# Verify idempotency: run clang-format again on the staged files
# and check that no further changes are produced
./Build/tmp/clang-format -i $(git diff --name-only --cached)
if ! git diff --quiet; then
echo "::error::clang-format is not idempotent - cannot auto-fix"
exit 1
fi
# Allow commit to work
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Append a commit with a fix applied
git commit -m "Fix formatting issues introduced by ${GITHUB_SHA}
cc @${GITHUB_ACTOR} please make sure to run clang-format locally before pushing changes to avoid this in the future."
# And we're off to the races!
git push
- name: Report formatting issues
if: |
steps.clang_format.outcome == 'failure' &&
!(github.ref == 'refs/heads/master' && github.event_name == 'push')
shell: bash
run: exit 1