forked from opencurve/curve
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (35 loc) · 1018 Bytes
/
clang-format.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: "Check Clang Format"
on: [push, pull_request]
jobs:
clang-format:
name: "Clang Formatter"
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
- name: Paths filter
uses: dorny/paths-filter@master
id: filter
with:
filters: |
file_changed:
- "**/*.cpp"
- "**/*.c"
- "**/*.h"
- "**/*.hpp"
- "**/*.cxx"
- name: "Format it!"
if: ${{ steps.filter.outputs.file_changed == 'true' }}
uses: DoozyX/clang-format-lint-action@master
id: check_format
with:
source: "./"
clangFormatVersion: 14
inplace: False
style: "file"
- name: Ignore it!
if: ${{ steps.filter.outputs.be_changes == 'false' }}
run: echo 'No need to check.'