Sitecore JSS project analysis

Hello All,
I am using SonarQube 8.2 version to analyze my Sitecore JSS solution. Sitecore has C# files and JSS has js files.

These JSS (.js) files are not part of Visual studio solution but shipped along with the code base as Sitecore JSS is a headless approach where front end team works separately on js files and check in their code.

When I analyze my C# solution using MSBuild Scanner (sonar-scanner-msbuild- only c# files get analyzed as MSbuild scans c# files and skip JS files which are part of code base but not part of the Visual studio project.

So to run analyze both C# and JS files do I need to use two different scanners ?

I use below commands to run the code analysis
SonarScanner.MSBuild.exe begin /k:“my-project” /“http://my-server:9000” /d:sonar.login=“my-global-token”
MsBuild.exe /t:Rebuild
SonarScanner.MSBuild.exe end /d:sonar.login=“my-global-token”

Please help.

Sorry for the delay here @Sonarnewbie

The Scanner for MSBuild analyzes the files that are referenced in the CSPROJ. So if your JS files are not present in the VS project, then yes, you need two separate SQ projects, and two different analyses with two different scanners.