Hi, I use Gitlab CI for automation. My project is on .Net Framework 4.6. The problem is that SonarCloud does not analyze my test projects in a solution. I have .sonarcloud.properties
:
# Path to sources
sonar.sources=.
#sonar.exclusions=
#sonar.inclusions=
# Path to tests
#sonar.tests=.
#sonar.test.exclusions=
#sonar.test.inclusions=./ProcessFlowModuleDotNetV1.Tests
# Source encoding
sonar.sourceEncoding=UTF-8
# Exclusions for copy-paste detection
#sonar.cpd.exclusions=
and this is my stage:
sonarcloud-check:
stage: sonarcloud-check
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
dependencies:
- build
- test
script:
- echo "${CI_JOB_NAME}"
- SonarScanner.MSBuild.exe begin /k:"semansys_xbrlonecompliant" /o:"semansys" /d:sonar.verbose=true /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="token"
- nuget restore -ConfigFile .\nuget.config
- MsBuild.exe ./ /t:Rebuild
- SonarScanner.MSBuild.exe end /d:sonar.login="token"