Repository navigation
71 lines (68 loc) · 2.31 KB
/
Copy pathcppcheck.yml
File metadata and controls
71 lines (68 loc) · 2.31 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
name: 'CppCheck'
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
schedule:
- cron: '0 0 * * */5'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-26.04
permissions:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install
run: |
( cd /tmp
git clone --depth 1 'https://github.com/danmar/cppcheck.git'
cmake -S 'cppcheck' -B 'cppcheck/build'
cmake --build 'cppcheck/build' --parallel 4
sudo cmake --install 'cppcheck/build' )
- name: 'Configure'
run: cmake -S . -B 'build' -D BUILD_TESTING=OFF
- name: 'Build: Amalgamate'
run: cmake --build 'build' --target amalgamate
# cppcheck cannot evaluate the `__has_feature` compiler built-in.
- name: Verify
run: |
cppcheck \
--check-level=exhaustive \
--enable=all \
--error-exitcode=1 \
--suppress=internalAstError:support/eigen/fcarouge/eigen.hpp \
--suppress=knownConditionTrueFalse:include/fcarouge/typed_linear_algebra/typed_linear_algebra.tpp \
--suppress=missingIncludeSystem \
--suppress=noExplicitConstructor:include/fcarouge/typed_linear_algebra.hpp \
--suppress=syntaxError:sample/au_std.cpp \
--suppress=syntaxError:sample/mp_units_std.cpp \
--suppress=unhandledChar \
--suppress=unmatchedSuppression \
--suppress=unusedFunction \
--suppress=unusedStructMember:include/fcarouge/typed_linear_algebra/format.tpp \
--verbose \
-i build \
-I build/amalgamate/fcarouge \
-I include \
-I support/au \
-I support/au_eigen \
-I support/au_std \
-I support/eigen \
-I support/eigexed \
-I support/kokkos \
-I support/main \
-I support/mp_units \
-I support/mp_units_eigen \
-I support/mp_units_std \
-I support/nested_typed_eigen \
-U__has_feature \
.