From b88b12c77c1e94d62534cb60c28f1dcf8d5b9a5b Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Sun, 8 Dec 2019 19:39:13 +0100 Subject: [PATCH] Problem: sonar has no access to git history Solution: unshallow clone in analysis job --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index b33020e1..56e717ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -146,7 +146,9 @@ matrix: before_install: - if [ $TRAVIS_OS_NAME == "osx" -a $BUILD_TYPE == "android" ] ; then brew update; brew install binutils ; fi - if [ $TRAVIS_OS_NAME == "osx" -a $CURVE == "libsodium" ] ; then brew update; brew install libsodium ; fi +# To allow sonar to process history information, unshallow clone first. - if [ -n "$CLANG_TIDY" ] ; then + git fetch --unshallow ; curl -L https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip -o build-wrapper-linux-x86.zip ; unzip build-wrapper-linux-x86.zip ; export SONARCLOUD_BUILD_WRAPPER_PATH="$(pwd)/build-wrapper-linux-x86/" ;