From f2016ac4d65391686af6e3755e0b5fda6330c4ac Mon Sep 17 00:00:00 2001 From: Vasundhara Jagdale Date: Tue, 28 Mar 2023 20:48:59 +0530 Subject: [PATCH] Adds configuration required for sonarqube integration. (#6480) Signed-off-by: Vasu1105 --- .expeditor/buildkite/verify.sh | 4 ++-- sonar-project.properties | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.expeditor/buildkite/verify.sh b/.expeditor/buildkite/verify.sh index 5cfe88de2..0a982f6df 100755 --- a/.expeditor/buildkite/verify.sh +++ b/.expeditor/buildkite/verify.sh @@ -54,7 +54,7 @@ RAKE_EXIT=$? # If coverage is enabled, then we need to pick up the coverage/coverage.json file if [ -n "${CI_ENABLE_COVERAGE:-}" ]; then echo "--- installing sonarscanner" - export SONAR_SCANNER_VERSION=4.6.2.2472 + export SONAR_SCANNER_VERSION=4.7.0.2747 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -71,7 +71,7 @@ if [ -n "${CI_ENABLE_COVERAGE:-}" ]; then echo "--- running sonarscanner" sonar-scanner \ -Dsonar.sources=. \ - -Dsonar.host.url=https://sonarcloud.io + -Dsonar.host.url=https://sonar.progress.com fi exit $RAKE_EXIT diff --git a/sonar-project.properties b/sonar-project.properties index 9c6510fe6..bdae0f3cd 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,8 +1,15 @@ +# must be unique in a given SonarQube instance +sonar.projectKey=inspec_inspec_AYahEXtgJ4YHsO5MtHEr + +# path to test coverage report generated by simplecov sonar.ruby.coverage.reportPaths=coverage/coverage.json -sonar.projectKey=inspec_inspec -sonar.organization=inspec + +# exclude test directories from coverage sonar.coverage.exclusions=test/*,lib/plugins/*/test/* + sonar.exclusions=**/*.java,**/*.js,vendor/* + +# skip C-language processor sonar.c.file.suffixes=- sonar.cpp.file.suffixes=- -sonar.objc.file.suffixes=- +sonar.objc.file.suffixes=- \ No newline at end of file