Please check that inclusion that inclusion/exclusion pattern produce disjoint sets for main and test files

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

SonarQube Edition : Enterprise
SonarQube Version : 8.9LTS

I am facing issue when analyse c++ code in sonar.

Error message : File ABC/…/pqr.cpp can’t be indexes twice.Please check that inclusion that inclusion/exclusion pattern produce disjoint sets for main and test files.
Error:
The sonarqube scanner did not compete successfully.
Exit code :1
Cmd.exe exited with code ‘1’

Could you please help me .

Hi,

It sounds like your path for sonar.sources overlaps your path for sonar.tests. The easiest thing is to untangle that if it’s not on purpose. If it is, you’ll need to set inclusions/exclusions to make sure no files fall in both categories. The docs should help.

 
Ann

Not getting this error anymore. But now there’s a new issue.
We are running multiple files,all are analysing except c#.

I am getting the following warning-

Warn: Your project contains c# filles which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher.

Hi,

I’m glad you got your first error sorted out. Generally we try to keep it to one topic per thread. However, your log message is pretty clear. The SonarScanner for .NET docs should help.

 
Ann