I have a repository containing two projects, a backend .net core api project and a frontend typescript based project. The typescript based project has no project file, just plain source files.
Using the Azure Pipelines tasks I’m unable to successfully get both projects under a single analysis. If I use the msbuild scanner, the backend api project gets analysed, but not the frontend. If I use the base cli scanner the opposite is true.
Using the following task definition:
- task: SonarCloudPrepare@1
displayName: Prepare analysis on SonarCloud
inputs:
SonarCloud: 'SonarCloud'
organization: '[REDACTED]'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: '[REDACTED]'
cliProjectName: '[REDACTED]'
cliProjectVersion: '$(Build.BuildNumber)'
cliSources: '.'
extraProperties: |
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
sonar.exclusions=**/node_modules/**/*,**/bundle.js
I can see in the Run Analysis task that the c# source files get indexed as [cs], but the sensor never analyses them:
11:15:52.840 INFO: Sensor C# [csharp]
11:15:52.840 INFO: Sensor C# [csharp] (done) | time=0ms
The frontend files do get analysed with this configuration.
Is it possible to analyse a .net core project using the core sonarscanner? If not, how should this repository be handled?
Additional Details:
SonarQube Scanner 4.1.0.1829
SonarQube server 8.0.0
SonarC# 8.2.0.14119 (csharp)
Sensors : SonarCSS Metrics -> SonarCSS Rules -> C# Properties -> JavaXmlSensor -> HTML -> SonarTS -> JaCoCo XML Report Importer -> JavaScript analysis -> TypeScript analysis -> C# -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor -> PythonSecuritySensor