-
-
Notifications
You must be signed in to change notification settings - Fork 120
47 lines (41 loc) · 1.3 KB
/
ci_lint.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
name: CI Lint
on:
workflow_dispatch:
workflow_call: # This allows it to be called from ci_main.yml
jobs:
clang-format:
runs-on: ubuntu-22.04
steps:
- name: Clone Repository
uses: actions/checkout@v4
- name: Run clang-format
uses: DoozyX/[email protected]
with:
source: '.'
exclude: './simplepyble'
extensions: 'h,hpp,cpp,c'
clangFormatVersion: 14
inplace: False
cppcheck:
runs-on: ubuntu-22.04
steps:
- name: Clone Repository
uses: actions/checkout@v4
- name: Install CppCheck
run: |
sudo -H apt-get update -y
sudo -H apt-get install -y cppcheck
env:
DEBIAN_FRONTEND: noninteractive
- name: Run Cppcheck
# TODO: Fix the suppressed file.
run: cppcheck --suppress=objectIndex:simpleble/src/backends/windows/Utils.cpp --std=c++17 --error-exitcode=1 --xml --xml-version=2 --force . 2>cppcheck_res.xml
- name: Generate Report
if: ${{ failure() }}
run: cppcheck-htmlreport --title=SimpleBLE --file=cppcheck_res.xml --report-dir=report
- name: Upload Report
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: report
path: report