Closed chaisri-bh closed 2 months ago
The scan works on single .sln or .csproj file. The scan invokes the dotnet SDK dotnet build
command and appends whatever you specify in dotnetBuildArguments
parameter.
If you have sub-folder with a single .sln or .csproj file you can specify the folder like in this example: https://github.com/highbyte/sonarscan-dotnet?tab=readme-ov-file#build-subfolder-src-and-include-code-coverage
Or if you want to specify a specific .sln (or .csproj) file in a sub-folder you use it like this: dotnetBuildArguments: ./myfolder/mysolution.sln
thank you. you can close it now
I have integrated the sonar scan in our build pipeline. But the repo we are using have multiple backend services in the same repo. when i trigger the sonar scan it cannot able to find the .sln file as it will be available in the nested repo of the backend service.
how can i provide the project base directory path to run the scan
Github Action input parameters INPUT_SONARPROJECTKEY: *-*** INPUT_SONARPROJECTNAME: -* INPUT_SONARORGANIZATION: INPUT_DOTNETPREBUILDCMD: INPUT_DOTNETBUILDARGUMENTS: INPUT_DOTNETTESTARGUMENTS: INPUT_DOTNETDISABLETESTS: INPUT_SONARBEGINARGUMENTS: INPUT_SONARHOSTNAME:
i want to provide the specific path of the backend service to run the scan. which is available in sonar scan github action projectBaseDir: App/*/**/****