Closed STCUSoftDev closed 2 months ago
Hello Currently MSBuild Scanner support is still in progress (unfortunately it's delayed due to more important tasks) but it will definitely support multiple invocations.
The current state of this is a bit of a problem.
We need to invoke scans for both c# code and typescript code and this requires different scanners ..ultimately this requires us to use multiple scanners, but how are we supposed to report all this to the Sonar server?
@KellyR-STCU As I understand SonarScanner for MSBuild should be able to perform analysis on multi-language project automatically - at runtime it actually runs classic java based SonarScanner. You should provide SonarTS specific parameters as additional command-line arguments. There could be a problem with sonar.sources parameter - MSBuild Scanner provides this parameter from msbuild project structure. If you can mark your TS code in msbuild as sources then it could work.
Running 2 different Scanners is possible but is not correct - these 2 invocations won't be merged so you'll need to use separate SonarQube project keys for them.
TeamCity plugin does nothing specific with the Scanner - just correctly invokes the command line. So you can try running the scan manually (probably with a different local server or project key) to understand the procedure.
I'm sorry I cannot help with investigating your case right now as I'm on vacation and have little time.
@KellyR-STCU Did you succeed in configuring your analysis?
You can specify Sources location:
in runner settings and create additional step.
Also you can create two projects in SonarQube/Cloud to analyze different codebases
We have a need to Invoke multiple scanners in the same run. First we need to invoke the MSBuild based Scan and then we also need to do a Typescript scan (front end is completely disassociated from the backend)
Would this be possible to support?