Skip to content

Commit b91c55e

Browse files
Lee NewbergLeengit
authored andcommitted
ENH: Automate clang-format of C++ source files
1 parent 265b338 commit b91c55e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Apply clang-format to PR
2+
3+
on:
4+
pull_request:
5+
types: [labeled]
6+
7+
jobs:
8+
clang-format:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: InsightSoftwareConsortium/ITKApplyClangFormatAction@master
16+
with:
17+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/clang-format-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v1
10+
- uses: actions/checkout@v2
1111
- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master
1212
with:
1313
error-message: 'Code is inconsistent with ITK Coding Style. Add the *action:ApplyClangFormat* PR label to correct.'

0 commit comments

Comments
 (0)