File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed
Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ concurrency:
1010 group : clang-format-${{ github.event_name }}-${{ github.ref_name }}
1111 cancel-in-progress : true
1212
13+ defaults :
14+ run :
15+ shell : bash
16+
1317permissions : read-all
1418
1519jobs :
@@ -20,13 +24,28 @@ jobs:
2024 uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2125 with :
2226 fetch-depth : 0
27+ lfs : true
2328
2429 - name : Setup python version
2530 uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
2631 with :
2732 python-version : ' 3.13'
2833
29- - name : Run clang-format via pre-commit
34+ - name : Run clang-format via pre-commit (pull_request)
35+ if : github.event_name == 'pull_request'
36+ uses : pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
37+ with :
38+ extra_args : >
39+ clang-format
40+ --show-diff-on-failure
41+ --from-ref ${{ github.event.pull_request.base.sha }}
42+ --to-ref ${{ github.event.pull_request.head.sha }}
43+
44+ - name : Run clang-format via pre-commit (push)
45+ if : github.event_name != 'pull_request'
3046 uses : pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
3147 with :
32- extra_args : clang-format
48+ extra_args : >
49+ clang-format
50+ --show-diff-on-failure
51+ --all-files
Original file line number Diff line number Diff line change 2222 rev : v5.0.0
2323 hooks :
2424 - id : check-json
25- exclude : .* tests/lit/.*
25+ exclude : ' docs/.*|.* tests/lit/.*'
2626 - id : trailing-whitespace
2727 exclude : ' docs/.*|thirdparty/.*|sw_runtime_kernels/.*|.*.md'
2828 - id : end-of-file-fixer
You can’t perform that action at this time.
0 commit comments