-
-
Notifications
You must be signed in to change notification settings - Fork 118
45 lines (39 loc) · 1.22 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
name: CI Lint
on: [push, pull_request]
jobs:
clang-format:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run clang-format
uses: DoozyX/clang-format-lint-action@v0.14
with:
source: '.'
exclude: './simplepyble'
extensions: 'h,hpp,cpp,c'
clangFormatVersion: 14
inplace: False
cppcheck:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- 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@v3
with:
name: report
path: report