Skip to content

Commit 9f8730d

Browse files
Clang-format fix (#209)
1 parent 1b560a5 commit 9f8730d

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

.github/workflows/clang-format.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff 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+
1317
permissions: read-all
1418

1519
jobs:
@@ -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

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
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

docs/img/high_level_design.png

-30.8 KB
Loading

docs/img/stateful_models.png

-48 KB
Loading

0 commit comments

Comments
 (0)