Hi everyone,
First, my environment:
I’m using SonarScanner.MSBuild.exe 10.3 and Sonar Server 2025.3.1 (zip version).
I’m trying to analyze a Visual Studio 2022 solution that contains one project and one test project.
Some logs suggest that the scanner is detecting the files to be analyzed correctly:
INFO: Project configuration:
INFO: Indexing files of module ‘ParthenoReorg’
INFO: Base dir: C:\zGit\ParthenoReorg\ParthenoReorg
INFO:Test paths: CsvManager.cs, ExcelManager.cs, MainForm.cs, MainForm.Designer…
INFO: Indexing files of module ‘ParthenoReorgTests’
INFO: Base dir: C:\zGit\ParthenoReorg\ParthenoReorgTests
INFO:Test paths: app.config, packages.config, .vs/ParthenoReorgTests.csproj.dtbc…
INFO: Indexing files of module ‘ParthenoReorg’
INFO: Base dir: C:\zGit\ParthenoReorg
INFO: Source paths: .sonarlint/ParthenoReorg.json, .vs/ParthenoReorg/v17/Document…
INFO: 17 files indexed (done) | time=115ms
INFO: Quality profile for cs: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: Quality profile for yaml: Sonar way
Except that all files are tagged Test paths, including the code I want to analyze (I don’t know if this is a clue or if it’s systematic).
In the end, the scanner communicates with the server (the date is updated).
I can navigate to the “code” tab and see the files, but all the indicators are at 0.
Does anyone have any idea what might be causing this?