Skip to content

Commit 6b951d4

Browse files
Adding a workflow to check source code formatting for c++ files
1 parent a06a618 commit 6b951d4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Source code format check
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
check-format:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
- name: Install dependencies
17+
run: sudo apt-get install -y clang-format
18+
- name: Run clang-format
19+
run: |
20+
git $(ls-files '*.*pp') | xargs clang-format -n -Werror

0 commit comments

Comments
 (0)