diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6012aca066a08b7740fd31a2ec58f069b2f6d602..06f1d62e74aaa9f07a23a91040fb572242713948 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,12 +17,12 @@ build: cppcheck: script: - - cppcheck --enable=all --error-exitcode=1 -I inc src + - bash -x ci/cppcheck.sh vera: script: - - vera++ --error --profile custom `find src inc -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` + - bash -x ci/vera.sh clang-tidy: script: - - cd ci && clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` -- -std=c++11 -I../inc + - bash -x ci/clang-tidy.sh diff --git a/ci/clang-tidy.sh b/ci/clang-tidy.sh new file mode 100755 index 0000000000000000000000000000000000000000..051a2a9b79eda985cdb5c6ad10c3b6a7bfd99fb5 --- /dev/null +++ b/ci/clang-tidy.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# +# Code style checks using clang-tidy +# +# Usage: +# $ ci/clang-tidy.sh +# + +cd "$(dirname "$0")" +clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` -- -std=c++11 -I../inc diff --git a/ci/cppcheck.sh b/ci/cppcheck.sh new file mode 100755 index 0000000000000000000000000000000000000000..d441040a1b38aceff3fe6232d85ec802fd584c58 --- /dev/null +++ b/ci/cppcheck.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# +# Static code analysis using cppchecl +# +# Usage: +# $ ci/cppcheck.sh +# + +cd "$(dirname "$0")/.." +cppcheck --enable=all --error-exitcode=1 -I inc src diff --git a/ci/vera.sh b/ci/vera.sh new file mode 100755 index 0000000000000000000000000000000000000000..0e2451bfad5fb352a4d085827f52f8892f78d9c3 --- /dev/null +++ b/ci/vera.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# +# Code style checks using vera++ +# +# Usage: +# $ ci/vera.sh +# + +cd "$(dirname "$0")/.." +vera++ --error --profile custom `find src inc -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'`