SonarQube version 7.9.1
SonarQube MSBuild scanner version: 184.108.40.2068
Currently, we are having problem a project that show no analysis after build and scan. Logs are showed as success and I could not see any problems. But in the Overview page, it only shows “The main branch has no code” even though there are some in the Code tab page. Please help!
Attached build log as well as background task from the project.BackgroundTask.txt (6.1 KB) BuildLog.txt (182.4 KB)
From the logs, it looks like there is only one MSBuild project file and it contains both product and test code. This is causing the scanner to treat it all as test code, leading to warning about there being no code (and presumably no issues reported in SonarQube either).
See this thread for more information about how the categorisation of code as test/product code is currently done by the Scanner for MSBuild, and how to tell the scanner to treat the whole project file as source code.
Thanks for the quick response. I will test it and let you know how it goes.
hi @toanvo729 - did it work in the end?
Did not hear back from our devs yet. But we had a similar issue with MF Cobol application, and we fixed that by adding file suffixes (.pco) to COBOL language.
Do you have any news from the devs, did they manage to solve the problem?