-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathonly-clang-format.yml
More file actions
28 lines (24 loc) · 932 Bytes
/
only-clang-format.yml
File metadata and controls
28 lines (24 loc) · 932 Bytes
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
name: cpp-linter
on:
pull_request:
branches: [main, master, develop]
paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake']
push:
branches: [main, master, develop]
paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake']
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# ... optionally setup build env to create a compilation database
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: 'file' # Use .clang-format config file. (1)
tidy-checks: '-*' # disable clang-tidy checks. (2)
- name: Fail fast?!
if: steps.linter.outputs.clang-format-checks-failed > 0
run: exit 1