Skip to content

Commit 22a00bd

Browse files
authored
Merge pull request #9 from jgaffiot/add_compile_command_to_cppcheck_in_precommit
Add compile command to cppcheck in precommit
2 parents 62cec23 + 5e9ef79 commit 22a00bd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ repos:
4646
description: Run `cppcheck` against C/C++ source files
4747
language: system
4848
files: \.(c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
49-
entry: cppcheck --error-exitcode=1
50-
args: [--enable=warning]
49+
entry: cppcheck
50+
args:
51+
- --enable=warning
52+
- --inline-suppr
53+
- --project=compile_commands.json
54+
- --error-exitcode=1]
5155

5256
- id: compilation
5357
name: Compilation

0 commit comments

Comments
 (0)