From 750eb24df417b401012595147dfc7a473b7af7e9 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Tue, 22 Nov 2016 10:33:29 -0500 Subject: Move Sonar config to build-data No actual reason for it to be in the root dir, only Sonar needs it, so just copy it to the root dir before starting. --- src/build-data/sonar-project.properties | 21 +++++++++++++++++++++ src/scripts/ci/travis/build.sh | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 src/build-data/sonar-project.properties (limited to 'src') diff --git a/src/build-data/sonar-project.properties b/src/build-data/sonar-project.properties new file mode 100644 index 000000000..408210b81 --- /dev/null +++ b/src/build-data/sonar-project.properties @@ -0,0 +1,21 @@ +# must be unique in a given SonarQube instance +sonar.projectKey=botan + +# this is the name displayed in the SonarQube UI +sonar.projectName=Botan +sonar.projectVersion=1.0 +  +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +# Since SonarQube 4.2, this property is optional if sonar.modules is set.  +# If not set, SonarQube starts looking for source code from the directory containing  +# the sonar-project.properties file. +sonar.sources=src + +# Language, needed for SonarQube < 4.2 +sonar.language=cpp + +# The build-wrapper output dir +sonar.cfamily.build-wrapper-output=bw-outputs + +# Encoding of the source code. Default is default system encoding +sonar.sourceEncoding=UTF-8 diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh index 0344fd892..014e963d7 100755 --- a/src/scripts/ci/travis/build.sh +++ b/src/scripts/ci/travis/build.sh @@ -139,6 +139,8 @@ ccache --show-stats if [ "$BUILD_MODE" = "sonarqube" ]; then + cp src/build-data/sonar-project.properties . + if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then # => This will run a full analysis of the project and push results to the SonarQube server. # -- cgit v1.2.3