cppcheck: specify necessary parameters
All checks were successful
continuous-integration/drone/push Build is passing

* that is, both in ci, pre-commit config and in the makefile
* makefile and ci args are a little more strict than the pre-commit ones
* use globs of the file extensions we're after
* add verbosity
This commit is contained in:
surtur 2021-10-29 22:43:03 +02:00
parent 65b081dc30
commit 519919326e
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
3 changed files with 8 additions and 3 deletions

View File

@ -14,7 +14,7 @@ def main(ctx):
"pacman -Sy cppcheck --noconfirm --needed",
"uname -r",
"cppcheck --version",
"cppcheck --enable=all ./*.cpp ./*.h"
"cppcheck --language=c++ --std=c++20 --enable=all --verbose ./*.{cpp,h}"
]
},
{

View File

@ -9,7 +9,12 @@ repos:
rev: v1.3.4
hooks:
- id: cppcheck
args: ["--language=c++", "--enable=performance,unusedFunction", "--std=c++20"]
args: ["--language=c++", "--std=c++20",
"--enable=warning,performance,portability,information,unusedFunction,missingInclude",
"--verbose"]
files: \.(cpp|cc|cxx,h)$
types: [file, c++]
types_or: [file, c++, header]
- repo: local
hooks:
- id: make-test

View File

@ -1,5 +1,5 @@
cppch = cppcheck
cppch_args = --enable=all ./*.cpp ./*.h
cppch_args = --language=c++ --std=c++20 --enable=all --verbose ./*.{cpp,h}
cpp_flags = -DCMAKE_CXX_FLAGS=-Wall -Werror -Wextra
c = cmake
c_args = -G Ninja -DCMAKE_BUILD_TYPE=