Update format action

This commit is contained in:
larzie 2024-12-25 17:37:44 +03:00 committed by GitHub
parent 6c209ac114
commit 4baa5929ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,9 @@
name: Format name: Format
on: [push, pull_request] on:
push:
pull_request:
workflow_dispatch:
jobs: jobs:
clang-format: clang-format:
@ -8,12 +11,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout repository
uses: actions/checkout@v4
- name: Run clang-format - name: Run clang-format
run: | run: |
find CONFIG LEGO1 ISLE -iname '*.h' -o -iname '*.cpp' | xargs \ find CONFIG LEGO1 ISLE -iname '*.h' -o -iname '*.cpp' | xargs \
pipx run "clang-format>=17,<18" \ pipx run "clang-format>=17,<18" \
--style=file \ --style=file \
-i -i
git diff --exit-code git diff --exit-code