-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (43 loc) · 1.09 KB
/
code-quality.yml
File metadata and controls
50 lines (43 loc) · 1.09 KB
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
50
name: Code Quality Check
on:
push:
branches:
- master
paths:
- 'src/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'scripts/**'
pull_request:
branches:
- master
paths:
- 'src/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'scripts/**'
jobs:
code-quality:
name: Code Formatting & Linting Check
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Verify clang-tools installation
run: |
clang-format --version
clang-tidy --version
shell: pwsh
- name: Check code formatting for compliance
run: |
$files = Get-ChildItem -Path src -Recurse -Include *.cpp,*.h
clang-format --dry-run --Werror --style=file $files
shell: pwsh # Use PowerShell for Get-ChildItem
- name: Set up MSVC build environment for the script
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Run clang-tidy
shell: cmd
run: |
scripts\lint.bat