- ALM used - GitHub
- Scanner used - autoscan
- Languages of the repository - Python and TypeScript
This is the error we see on our side:
ERROR: File webapp/release-requirements.txt can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files
For us, it means you have configured custom inclusions/exclusions settings for your project in the .sonarcloud.properties
file at the root of your repository.
You have probably made a mistake in your path patterns, for example:
sonar.sources=webapp/
sonar.tests=webapp/
sonar.exclusions=webapp/**/test/**/*
in this case, the file webapp/release-requirements.txt
will be included in the 2 source sets “main” and “test”.
One way to fix this is to ensure the 2 source sets are disjoint:
sonar.sources=webapp/
sonar.tests=webapp/
sonar.exclusions=webapp/**/test/**/*
sonar.test.inclusions=webapp/**/test/**/*
1 Like