I have setup dotnet sonarscanner for my opensource project, in the build log it says that it picked up the report:
INFO: Adding this code coverage report to the cache for later reuse: /home/runner/work/UMVC/UMVC/UMVC.Core/./dotCover.Output.html
INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=3ms
Unfortunately the build logs are no longer present. Would it be possible to do another run with verbose logging enabled (/d:“sonar.verbose=true”) and send us the logs? Additionally, could you please share with us the generated coverage file?
2023-01-27T19:02:48.4121927Z 19:02:48.412 INFO: Sensor C# Tests Coverage Report Import [csharp]
2023-01-27T19:02:48.4129889Z 19:02:48.412 DEBUG: Analyzing coverage with wildcardPatternFileProvider with base dir '/home/runner/work/UMVC/UMVC/UMVC.Core/.' and file separator '/'.
2023-01-27T19:02:48.4140347Z 19:02:48.413 DEBUG: Pattern matcher extracted prefix/absolute path '/home/runner/work/UMVC/UMVC/UMVC.Core/./coverage.xml' from the given pattern 'coverage.xml'.
2023-01-27T19:02:48.4148696Z 19:02:48.414 DEBUG: Pattern matcher returns a single file: '/home/runner/work/UMVC/UMVC/UMVC.Core/./coverage.xml'.
2023-01-27T19:02:48.4153506Z 19:02:48.415 DEBUG: The current user dir is '/home/runner/work/UMVC/UMVC/UMVC.Core'.
2023-01-27T19:02:48.4162876Z 19:02:48.415 INFO: Parsing the Visual Studio coverage XML report /home/runner/work/UMVC/UMVC/UMVC.Core/./coverage.xml
2023-01-27T19:02:48.4522112Z 19:02:48.451 INFO: Adding this code coverage report to the cache for later reuse: /home/runner/work/UMVC/UMVC/UMVC.Core/./coverage.xml
2023-01-27T19:02:48.4527166Z 19:02:48.452 DEBUG: Analyzing coverage after aggregate found '0' coverage files.
2023-01-27T19:02:48.4531117Z 19:02:48.452 DEBUG: The total number of file count statistics is '0'.
2023-01-27T19:02:48.4535197Z 19:02:48.453 INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=41ms
Would it be possible to share the content of this file with us? you can upload it as a build artifact, or modify the build to it’s content during the job
OK. What happens if you run the same command for code coverage without enclosing it by the scanner begin and end steps? If it’s still containing only the list of skipped modules the problem is not in the scanner.
Thanks for reply and sorry for wasting your time, the issue was the tests are run in a ubuntu-latest runner on github so I switched to windows-latest and now the coverage file has no more skipped modules.
I don’t know why skipped modules are only generated on ubuntu.