How do I run sonarscan to scan all files in the repository?

Must-share information (formatted with Markdown):

  • which versions are you using: SonarQube Server Enterprise: v10.7
  • how is SonarQube deployed: Helm
  • what are you trying to achieve: Scan all files in the repository
  • what have you tried so far to achieve this:
    I’m trying to scan code for repository with c++ and c# code. While using sonarscanner cli to scan the c# code is not analyzed and when I use the dotnet scanner both c++ and c# code is analysed but other files in the repository as skipped, like xml, txt,… I have configured the scan profile to include secret scanner as well as xml but they are not being used.

the project uses cmake to build and generate solution, which is placed outside of the repository path during the building process, then dotnet scanner starts monitoring the build step. Not able to find any solutions with different permutations for the usage of scanners.

Can someone please provide solution for how to scan all files? Thanks!

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hey there.

First of all, I suggest making sure you’re using the latest version of the Scanner for .NET which includes support for indexing files outside of solution while also analyzing your C# code (which you correctly figured out the SonarScanner CLI can’t do).

The latest version is v9.2.1. See the docs on Analyzing languages other than C# and VB