Skip to content

Commit 6b2efcd

Browse files
DreamPearlscopeInfinity
authored andcommitted
Add github action for code style linter
1 parent 4b91358 commit 6b2efcd

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/code-style.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Code Style CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Install clang-format
17+
run: |
18+
sudo apt-get update
19+
sudo apt install clang-format
20+
- name: C/CPP code style check
21+
run: |
22+
find . -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp -o -iname *.tcc | \
23+
xargs clang-format --style="{BasedOnStyle: llvm, IndentWidth: 4}" --dry-run --Werror

0 commit comments

Comments
 (0)