-
Notifications
You must be signed in to change notification settings - Fork 51
/
action.yml
49 lines (49 loc) · 1.25 KB
/
action.yml
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
42
43
44
45
46
47
48
49
name: 'clang-format lint'
author: 'Slobodan Kletnikov (DoozyX)'
description: 'Github Action that check if code is formatted correctly using clang-format'
branding:
icon: 'align-left'
color: 'green'
inputs:
source:
description: 'Source folder to check formatting'
required: false
default: '.'
exclude:
description: 'Folder to exclude from formatting check'
required: false
default: 'none'
extensions:
description: 'List of extensions to check'
required: false
default: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'
clangFormatVersion:
description: 'Version of clang-format'
required: false
default: '18'
style:
description: 'Formatting style to use'
required: false
default: 'file'
inplace:
description: 'Just fix files (`clang-format -i`) instead of returning a diff'
required: false
default: False
runs:
using: 'docker'
image: 'Dockerfile'
args:
- --clang-format-executable
- /clang-format/clang-format${{ inputs.clangFormatVersion }}
- -r
- --color
- always
- --style
- ${{ inputs.style }}
- --inplace
- ${{ inputs.inplace }}
- --extensions
- ${{ inputs.extensions }}
- --exclude
- ${{ inputs.exclude }}
- ${{ inputs.source }}