-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (69 loc) · 2.18 KB
/
code_quality.yml
File metadata and controls
79 lines (69 loc) · 2.18 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Static Analysis
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
jobs:
cppcheck:
name: Run Cppcheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: true
lfs: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cppcheck
- name: Run cppcheck
run: |
mkdir -p cppcheck-report
cppcheck --enable=all --inconclusive --quiet \
--output-file=cppcheck-report/cppcheck.txt \
$GITHUB_WORKSPACE/framework/src/ \
-I $GITHUB_WORKSPACE/include/ \
-I $GITHUB_WORKSPACE/framework/include/
cat cppcheck-report/cppcheck.txt
- name: Upload cppcheck report artifact
uses: actions/upload-artifact@v7
with:
name: cppcheck-report
path: cppcheck-report/cppcheck.txt
clang-tidy:
name: Run Clang-Tidy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: true
lfs: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-tidy
- name: Run clang-tidy
run: |
bazel run @hedron_compile_commands//:refresh_all
mkdir -p clang-tidy-report
clang-tidy -p $GITHUB_WORKSPACE/compile_commands.json \
--config-file=$GITHUB_WORKSPACE/.clang-tidy \
--export-fixes=clang-tidy-report/clang-tidy-fixes.yaml \
--quiet \
$GITHUB_WORKSPACE/framework/src/vx_*.cpp \
$GITHUB_WORKSPACE/framework/include/vx_*.h* \
$GITHUB_WORKSPACE/include/VX/vx*.h \
> clang-tidy-report/clang-tidy.txt \
2>&1 || true
cat clang-tidy-report/clang-tidy.txt
- name: Upload clang-tidy report artifact
uses: actions/upload-artifact@v7
with:
name: clang-tidy-report
path: |
clang-tidy-report/clang-tidy.txt
clang-tidy-report/clang-tidy-fixes.yaml