Skip to content

Commit 415e1f1

Browse files
committed
Add cppcheck
1 parent 1edf6c3 commit 415e1f1

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN apt update && apt upgrade --yes
1010
RUN apt install --yes gcc-14 g++-14
1111
RUN apt install --yes clang-format pre-commit
1212
RUN apt install --yes lcov
13+
RUN apt install --yes cppcheck
1314

1415
# Choose default gcc and g++ version
1516

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,22 @@ repos:
1414
hooks:
1515
- id: check-github-actions
1616
- id: check-github-workflows
17+
- repo: local
18+
hooks:
19+
- id: cppcheck
20+
name: cppcheck
21+
entry: cppcheck
22+
language: system
23+
args:
24+
[
25+
--clang=clang,
26+
--language=c++,
27+
--std=c++20,
28+
--enable=all,
29+
--suppress=unusedFunction,
30+
--suppress=unmatchedSuppression,
31+
--suppress=missingIncludeSystem,
32+
--suppress=toomanyconfigs,
33+
--error-exitcode=1,
34+
]
35+
files: \.(h|cpp)$

0 commit comments

Comments
 (0)