CI: adding quality of code ( cppcheck )

This commit is contained in:
Filip Bucek 2019-11-05 10:03:02 +01:00
parent c69bf4d2be
commit b7146da2ed
2 changed files with 15 additions and 4 deletions

View File

@ -2,6 +2,7 @@
stages: stages:
- build - build
- test - test
- quality
# ######## # ########
# Build # Build
@ -9,7 +10,7 @@ stages:
build: # name of task build: # name of task
stage: build # in what stage it will run ( 1. build then test etc ) stage: build # in what stage it will run ( 1. build then test etc )
tags: # Tags are used to choose correct gitlab-runner tags: # Tags are used to choose correct gitlab-runner
- hw # spaceti-runner server has running runners and one has tag 'hw' - linux # spaceti-runner server has running runners and one has tag 'hw'
script: # run in bash script: # run in bash
- mkdir -p build - mkdir -p build
- cd build - cd build
@ -26,7 +27,7 @@ cache:
test: # name of task test: # name of task
stage: test # in what stage it will run ( 1. build then test etc ) stage: test # in what stage it will run ( 1. build then test etc )
tags: # Tags are used to choose correct gitlab-runner tags: # Tags are used to choose correct gitlab-runner
- hw # spaceti-runner server has running runners and one has tag 'hw' - linux # spaceti-runner server has running runners and one has tag 'hw'
script: # run in bash script: # run in bash
- cd build - cd build
- make check test - make check test
@ -34,7 +35,17 @@ test: # name of task
valgrind: # name of task valgrind: # name of task
stage: test # in what stage it will run ( 1. build then test etc ) stage: test # in what stage it will run ( 1. build then test etc )
tags: # Tags are used to choose correct gitlab-runner tags: # Tags are used to choose correct gitlab-runner
- hw # spaceti-runner server has running runners and one has tag 'hw' - linux # spaceti-runner server has running runners and one has tag 'hw'
script: # run in bash script: # run in bash
- cd build - cd build
- valgrind make check test - valgrind make check test
# Quality of code
cppcheck:
stage: test # in what stage it will run ( 1. build then test etc )
tags: # Tags are used to choose correct gitlab-runner
- linux # spaceti-runner server has running runners and one has tag 'hw'
allow_failure: true
script: # run in bash
- cppcheck src --suppress=unusedFunction --enable=all -i build --error-exitcode=1

View File

@ -50,7 +50,7 @@ QString DatabaseManager::getLastQuery(const QSqlQuery& query) const
void DatabaseManager::log(const QString &msg) const void DatabaseManager::log(const QString &msg) const
{ {
qDebug("database logger implement logger"); qDebug() << "database logger implement logger";
} }
} // core } // core