cppcheck: specify necessary parameters
All checks were successful
continuous-integration/drone/push Build is passing
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:
parent
65b081dc30
commit
519919326e
|
@ -14,7 +14,7 @@ def main(ctx):
|
||||||
"pacman -Sy cppcheck --noconfirm --needed",
|
"pacman -Sy cppcheck --noconfirm --needed",
|
||||||
"uname -r",
|
"uname -r",
|
||||||
"cppcheck --version",
|
"cppcheck --version",
|
||||||
"cppcheck --enable=all ./*.cpp ./*.h"
|
"cppcheck --language=c++ --std=c++20 --enable=all --verbose ./*.{cpp,h}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,12 @@ repos:
|
||||||
rev: v1.3.4
|
rev: v1.3.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: cppcheck
|
- 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
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: make-test
|
- id: make-test
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
cppch = cppcheck
|
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
|
cpp_flags = -DCMAKE_CXX_FLAGS=-Wall -Werror -Wextra
|
||||||
c = cmake
|
c = cmake
|
||||||
c_args = -G Ninja -DCMAKE_BUILD_TYPE=
|
c_args = -G Ninja -DCMAKE_BUILD_TYPE=
|
||||||
|
|
Reference in New Issue