I am currently uploading my asp.net c# source code to my company’s on-prem instance of SonarQube. My company currently has Version 6.7.3 (build 38370) installed. We are uploading the code via a TFS build project using SonarQube.Scanner.MSBuild.exe. The log file says “SonarScanner for MSBuild 4.1.1” and INFO: SonarQube Scanner 3.1.0.1141
My code does get uploaded and my projects are analyzed successfully. But, I am noticing that some of my files are not being shown in the Code tab when I login to see what issues have come up. I cannot figure out if these specific files are not being analyzed or if they are excluded somehow. To show some proof, I have screen shots of my solution explorer and of the sonarqube code page where all the files should show up.
If you see these screen shots, you will see that Solution Explorer screen shot shows 31 files and the SonarQube Code Page screen shot only shows 22 files. Some how some of the files are missing or are not being analyzed. For example, UserDtls.aspx.cs is missing from the SonarQube page.
I have looked at the TFS Build logs. It shows all of the files in the “INFO: Source paths:”. So at this point, I am not sure where the issue could be.
Could you please help me trouble shoot this issue?
The solution was to go through every .cs file in my application and remove any comment that had the word “designer” in it. Apparently, the sonarscanner skips any file if it thinks it is a designer file. One of the ways it determines if it is a designer file is if the word “designer” appears anywhere in the file.
Thank you Jonathan,
but in our case there is no word “designer” in our classes and sometimes our results raised up but in next scan our results goes down. We could not find a proper solution about it.
Regards
@SalihE - can you please open a separate topic with a clear description of your problem?
@jonathan.arrabito - thanks a lot for explaining what you had to do. Indeed, our detection of generated and designer code is quite raw. (cc @Nicolas_Harraudeau)