-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scan fails with error 'File can't be indexed twice' #958
Comments
Relates (duplicates?) #838 |
Not sure. This is not the same error
…On Nov 20, 2017 11:34, "Amaury Levé" ***@***.***> wrote:
Relates (duplicates?) #838
<#838>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#958 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxVl881ONREIZQ3kOj-4VsmUdrhvfFwks5s4UezgaJpZM4QjhDH>
.
|
Hi @liortal53, Do you still have this issue with the RC version of the scanner for msbuild and SonarC#? |
This is related to https://jira.sonarsource.com/browse/SONARMSBRU-336 |
yes, i still see this issue. I attached a sample .sln and .csproj files
that result in this issue.
The problem is that with Unity, the .csproj files are auto-generated by the
Unity editor. It adds some of these files (which are duplicates) to
different .csproj files for some reason, even though they are added with a
<None> action so they are not really processed by the compilation process.
Maybe the scanner should ignore these files and not count them as
duplicates?
…On Mon, Nov 27, 2017 at 11:02 AM, Amaury Levé ***@***.***> wrote:
Hi @liortal53 <https://github.com/liortal53>,
Do you still have this issue with the RC version of the scanner for
msbuild and SonarC#?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#958 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxVl8KEUI51Dy5YeTZmw8YZGR5kOL0mks5s6nqggaJpZM4QjhDH>
.
|
Hi @liortal53, As @dbmeneses was suggesting we think we found your error and we will try to have it fixed for the next release. Please stay tuned. |
awesome, looking forward to that. what is the release frequency? are you
releasing frequently (e.g: once in a few weeks) ?
…On Mon, Nov 27, 2017 at 3:26 PM, Amaury Levé ***@***.***> wrote:
Hi @liortal53 <https://github.com/liortal53>,
As @dbmeneses <https://github.com/dbmeneses> was suggesting we think we
found your error and we will try to have it fixed for the next release.
Please stay tuned.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#958 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxVl2YDr9fzDWCO5KSoQm7bieqULXl6ks5s6rhngaJpZM4QjhDH>
.
|
We try (I insist on this) to release every 2 or 3 weeks. But sometime we have to give a bit more focus on some of the tools and so we kind of delay the others. For example we are a bit late of VSTS extension (regarding .Net Core support) and so we will focus on this subject on the next sprint. |
Here is the ticket: https://jira.sonarsource.com/browse/SONARMSBRU-354 |
I have similar issue with .NET Core application. All our .NET Core analysis failed with error: "File * can't be indexed twice. Please check that inclusion/exclusion Issue happend after update SonarQube from 6.2 to 6.7. SonarC# Version: 6.6 |
@pmaslan could you please provide the full logs? The problem reported here is due to a quite particular project structure. |
Yes, I can. Project structure is: Script for analysis looks like this:
|
@pmaslan I see that the root module has all files included in its source set:
This is not expected. Are you overriding some of the scanner properties? |
I moved all sources to src directory and run it again (with sonar.sources=. and then with .\src). Nothing changed. Overrided properties: |
Could you try to run the analysis without overriding 'sonar.sources'? The Scanner for MSBuild should automatically pickup all your sources based on the files that are in your solution. |
I removed sonar.source and analysis was success. @dbmeneses Thank you very much for your help. |
Hi @liortal53, I am closing this ticket and will be working on the one on JIRA as it is linked to the scanner product. |
The problem it's caused by /d:sonar.source="Project" or /d:sonar.tests="Project.Tests", just remove and works. |
Hi @MG12Coder, Disclaimer: I am not familiar with the Team City plugin so my answer might not be totally accurate. I see that you are providing the Could you give a try by blanking this property? |
Hi Evangelink, i tried removing source location property but does not help |
Could you please open a new GitHub issue and post the verbose logs ( |
@Evangelink can you please see about adding a console message for setting Here's an example of the console-output from one of my Jenkins builds:
Apologies if you're not the go-to person; I've just been trying to debug some issues with the MSBuild Wrapper today, and been wondering how to enable verbose output. |
Hi @the-nose-knows, Could you please create a separate ticket on the Scanner for MSBuild repository here? And could you add the log where it is asked to use the Thank you |
[11:20:25] 18:20:25.092 INFO: ------------------------------------------------------------------------ [11:20:25] 18:20:25.092 ERROR: Error during SonarQube Scanner execution [11:20:25] File [moduleKey=27158:com.att.floodportal:threat_map_angular, relative=client/src/app/components/rap.component.html, basedir=/opt/app/m61407_node/sdt-eco.vci.att.com_19592/workspace/l_threat_map_angular_master-XE7WZQW2ZBU5B6GKL5CB7CXENJT6UUZEWBWIVCLY7ZKLBTRF7ZWA] can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files [11:20:25] Return code: 1. /opt/app/m61407_node/sdt-eco.vci.att.com_19592/workspace/l_threat_map_angular_master-XE7WZQW2ZBU5B6GKL5CB7CXENJT6UUZEWBWIVCLY7ZKLBTRF7ZWA/util/node_modules/gulp-sonar/index.js:74 ============================================== projectKey: **** ,
|
Me too facing same issue |
Hi, Is there a way to control Sonar Indexing to Index only specified language or extension. I have used sonar.language=cs, but while performing analysis sonar index identifies unspecified language/file extensions and later it performs analysis only on specified language making other files as skipped. |
I am facing the same issue . Let me know what is the resolution. |
To give some general advice on this problem:
@sagar221 @kiransterling - this is the
I will be locking the conversation on this thread, as it does not contain actionable requests on the Thank you for your understanding 🙏. |
Description
When attempting to scan my Unity3d project (c# usig Mono), scanning fails with this error:
Please provide a succinct description of your issue.
The Unity game engine auto-generates a .sln and .csproj files for the code in the project. Since the project contains art assets, the .csproj files also contain references to these files, for example (taken from the attached .csproj file):
The problem is, that multiple .csproj files contain these source files, even though they are marked as "None" (e.g: not compiled).
Repro steps
Attaching the problematic .csproj files as well as the the scan log + matching .sonarqube folder.
Hopefully, this should suffice for diagnosing the issue. If not, let me know.
csharp_scan_bug.zip
The text was updated successfully, but these errors were encountered: