Skip to content

Commit

Permalink
Revise check_clang_format workflow to report all errors (#86)
Browse files Browse the repository at this point in the history
The clang-format checker fails after finding a file with a
format error, requiring multiple commits to find all the errors.
This CL updates the workflow to process all changed files in a
single invocation, which should solve the problem.

Signed-off-by: Derek G Foster <[email protected]>
  • Loading branch information
ffoulkes authored Mar 5, 2024
1 parent 94f4460 commit 927be8e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
uses: actions/checkout@v4

- name: Get list of changed Files
id: changes
id: changed
uses: tj-actions/changed-files@v42
with:
files: |
Expand All @@ -142,7 +142,6 @@ jobs:
**.cc
- name: Check for formatting errors
if: steps.changed.outputs.any_changed == 'true'
run: |
for file in ${{ steps.changes.outputs.all_changed_files }}; do
clang-format --dry-run -Werror $file
done
clang-format -n -Werror ${{ steps.changed.outputs.all_changed_files }}

0 comments on commit 927be8e

Please sign in to comment.