Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenVolumeMesh
OpenVolumeMesh
Commits
d5c746c1
Commit
d5c746c1
authored
Jul 26, 2019
by
Martin Heistermann
Browse files
cppcheck: use compile_commands.json, fixes
#16
parent
057e5c3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
CI/ci-cppcheck.sh
View file @
d5c746c1
...
...
@@ -10,6 +10,12 @@ NC='\033[0m'
OUTPUT
=
'\033[0;32m'
WARNING
=
'\033[0;93m'
BUILDPATH
=
"build-cppcheck"
mkdir
-p
"
${
BUILDPATH
}
"
cd
"
${
BUILDPATH
}
"
cmake
-DCMAKE_EXPORT_COMPILE_COMMANDS
=
ON ..
cd
..
echo
-e
"
${
OUTPUT
}
"
echo
"=============================================================================="
echo
"Running cppcheck"
...
...
@@ -20,7 +26,15 @@ echo -e "${NC}"
echo
"Please Wait ..."
# Run cppcheck and output into file
cppcheck
--enable
=
all
.
-I
src
-i
Doc/
--force
--suppress
=
missingIncludeSystem
--inline-suppr
--quiet
-Umin
-Umax
-UBMPOSTFIX
-DOPENVOLUMEMESHDLLEXPORT
=
""
2>&1 |
tee
cppcheck.log
# we do not enable 'style' and 'unusedFunction' (the latter gives false positive
# for the public library interface)
cppcheck
\
--project
=
${
BUILDPATH
}
/compile_commands.json
\
--enable
=
warning,performance,portability,information,missingInclude
\
--suppress
=
missingIncludeSystem
\
--inline-suppr
\
--quiet
\
2>&1 |
tee
cppcheck.log
COUNT
=
$(
wc
-l
< cppcheck.log
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment