MSBuild javascript files not analyzed

Hi,
I have a solution with AspNet WebForms project which contains C#, javascript and typescirpt files. I am setting up pull request analysis with Azure DevOps, however I don’t see any issues reported on js/ts files. I can see number of lines in the Code tab, but no issues at all. When I copy the same files to another project in the solution, a simple C# library, the are being analyzed. The files are included in the project with Content type.
In the logs I can see that the files from this web project are indexed as test and this happens only for this project in the solution. Could this be the problem? How can i fix that?
sonar.sources=
sonar.tests= //all the files are here

File X indexed as test with language ‘js’

SonarQube 8.6.0
SonarScanner for MSBuild 5.0.4

Hi @mikomada. Welcome to the community!

Yes, that would be the behaviour if the project is being treated as a test project.

Have a look at this wiki page that explains how the SoanrScanner for .NET categorises projects and how to override the default categorisation for a specific project.

1 Like

Hi Duncan,
Setting the flag explicitly has solved the problem. Thank you for a quick response.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.