Skip to content

Commit 550ff71

Browse files
committed
workflows: add plugin lint action
1 parent 060c40c commit 550ff71

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: clang-format check
2+
description: Checks formatting using clang-format
3+
4+
inputs:
5+
source-dir:
6+
description: 'Root directory of the cpp project'
7+
required: false
8+
default: '.'
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Install clang-format
14+
shell: bash
15+
run: sudo apt-get install -y clang-format
16+
17+
- name: Run clang-format
18+
shell: bash
19+
run: |
20+
find ${{ inputs.source-dir }}/src ${{ inputs.source-dir }}/tests \
21+
-name '*.cpp' -o -name '*.h' | \
22+
xargs clang-format --dry-run --Werror

0 commit comments

Comments
 (0)