Skip to content
Snippets Groups Projects
Commit 491a019c authored by Jens Georg's avatar Jens Georg
Browse files

cppcheck: Add fallback if build db does not exist

parent 39bd34ca
No related branches found
No related tags found
No related merge requests found
......@@ -458,7 +458,11 @@ def doPublishBuildTestDeploy(ArrayList<String> builds) {
sh """
pwd
mkdir -p build
cppcheck --enable=all --xml --xml-version=2 --project=compile_commands.json 2> ./build/cppcheck.xml
if [ -e compile_commands.json ]; then
cppcheck --enable=all --xml --xml-version=2 --project=compile_commands.json 2> ./build/cppcheck.xml
else
cppcheck --enable=all --xml --xml-version=2 -ibuild -Iinclude . 2> ./build/cppcheck.xml
fi
"""
publishCppcheck pattern: 'build/cppcheck.xml'
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment