Skip to content

Commit

Permalink
Revert "ci: clang_format.yml lints only modified source files (#196)"
Browse files Browse the repository at this point in the history
This reverts commit 28f58d7.
  • Loading branch information
alandtse authored Jul 13, 2024
1 parent 02e0c26 commit a83c323
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,10 @@ jobs:
# make sure the parent commit is grabbed as well, because
# that's what will get formatted (i.e. the most recent commit)
fetch-depth: 2
# retrieve comma-separated list of modified files
- name: Retrieve changed files
id: changed-files
uses: tj-actions/[email protected]
with:
files: |
src/**/*.{cpp,h}
include/**/*.{h,hpp}
**/*.hlsl
**/*.hlsli
separator: ","
# process modified files list before passing to clang-format-lint-action
- name: Process changed files list
id: process-list
run: |
CHANGED_FILES="${{ steps.changed-files.outputs.all_changed_files }}"
CHANGED_FILES="${CHANGED_FILES// /\\ }"
CHANGED_FILES=$(echo "$CHANGED_FILES" | tr ',' ' ')
echo "::set-output name=changed_files::${CHANGED_FILES}"
# format the latest commit
- name: Format changed files
if: steps.changed-files.outputs.any_changed == 'true'
uses: DoozyX/[email protected]
- uses: DoozyX/[email protected]
with:
source: "${{ steps.process-list.outputs.changed_files }}"
source: "."
exclude: "extern include"
extensions: "h,cpp,c,hlsl,hlsli"
clangFormatVersion: 16
Expand Down

0 comments on commit a83c323

Please sign in to comment.