Skip to content

Commit 9f9ef8a

Browse files
authored
Sonar migration (#1273)
Add token for login to SonarQube Now it's required option. Fix properties Path>Paths in Sonar Add file suffixes needed for Sonar Remove wrapper Exclude jave files from scan Relates-To: OAM-1302 Signed-off-by: Yaroslav Stefinko <[email protected]>
1 parent efaed97 commit 9f9ef8a

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

scripts/linux/nv/gitlab_cppcheck_and_upload_sonar.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ mv cppcheck.xml "$cppcheck_folder/cppcheck.xml"
5656

5757
# Set needed properties for Valgrind
5858
echo "sonar.host.url=${SONAR_HOST}" >> ${NV_HOME}/sonar-project.propertiesValgrind
59+
echo "sonar.login=${SONAR_TOKEN}" >> ${NV_HOME}/sonar-project.propertiesValgrind
5960
cp ${NV_HOME}/sonar-project.propertiesValgrind ${REPO_HOME}/sonar-project.properties
6061

61-
SONAR_SCANNER_ROOT="/home/bldadmin/sonarqube-linux/sonar-scanner-3.2.0.1227-linux/bin"
62-
6362
echo "#############################"
6463
echo "Sonar scanner run : "
6564
echo "#############################"
66-
$SONAR_SCANNER_ROOT/sonar-scanner -X
65+
$SONAR_SCANNER_ROOT/sonar-scanner -X -Dsonar.verbose=true
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
sonar.projectKey=com.here.edge-platform:olp-cpp-sdk-Valgrind
22
sonar.projectName=olp-cpp-sdk-Valgrind
3+
sonar.projectVersion=data-sdk-cpp-${env.CI_COMMIT_BRANCH}:${env.CI_COMMIT_SHORT_SHA}-${env.CI_PIPELINE_ID}
34
sonar.sources=./olp-cpp-sdk-authentication/src/,./olp-cpp-sdk-core/src/,./olp-cpp-sdk-dataservice-read/src/,./olp-cpp-sdk-dataservice-write/src/
4-
sonar.cfamily.build-wrapper-output=bw_output
5-
sonar.sourceEncoding=UTF-8
65
sonar.tests=./olp-cpp-sdk-authentication/tests/,./olp-cpp-sdk-core/tests/,./olp-cpp-sdk-dataservice-read/tests/,./olp-cpp-sdk-dataservice-write/tests/
7-
sonar.language=c++
86
sonar.test.exclusions=./olp-cpp-sdk-authentication/tests/,./olp-cpp-sdk-core/tests/,./olp-cpp-sdk-dataservice-read/tests/,./olp-cpp-sdk-dataservice-write/tests/
9-
sonar.cxx.cppcheck.reportPath=./reports/cppcheck/
10-
sonar.cxx.xunit.provideDetails=true
11-
sonar.cxx.xunit.reportPath=./reports/
12-
sonar.cxx.valgrind.reportPath=./reports/valgrind/
7+
sonar.exclusions=**/*.java
8+
sonar.sourceEncoding=UTF-8
9+
sonar.cxx.file.suffixes=.cxx,.cpp,.cc,.hxx,.hpp,.hh,.h
10+
sonar.cxx.cppcheck.reportPaths=./reports/cppcheck/cppcheck.xml
11+
sonar.cxx.xunit.reportPaths=./reports/*report.xml
12+
sonar.cxx.valgrind.reportPaths=./reports/valgrind/*memcheck.xml
13+
sonar.branch.name=master
14+
sonar.scm.exclusions.disabled=true

0 commit comments

Comments
 (0)