- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: Prepare analysis on SonarCloud
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
Also both sonar.web.javaOpts and sonar.ce.javaOpts are server-side options for SonarQube operation. You do not need to worry about those as you are relying on SonarCloud. Setting those for an analysis during a build will have no effect. Just set SONAR_SCANNER_OPTS which as you saw in your deleted post does have an effect (i.e. setting it to 4096 bytes did lead to an immediate failure of the JVM)
Thanks - I have managed to get this to work using your advice. I have set a variable in the VSTS build called SONAR_SCANNER_OPTS with a value of -Xmx8192m.
This now allows the Run Code Analysis task to pass.
The issue now is that the Publish Quality Gate Result task now fails with:
2018-09-17T03:41:36.9100259Z ##[section]Starting: Publish Quality Gate Result
2018-09-17T03:41:36.9103266Z Task : Publish Quality Gate Result
2018-09-17T03:41:36.9103412Z Description : Publish SonarCloud's Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
2018-09-17T03:41:36.9103543Z Version : 1.3.0
2018-09-17T03:41:36.9103640Z Author : sonarsource
2018-09-17T03:41:36.9103874Z Help : [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2018-09-17T03:41:43.0254685Z ##[error]Failed find: Maximum call stack size exceeded
2018-09-17T03:41:43.1234051Z ##[section]Finishing: Publish Quality Gate Result
I think this is to do with the following error in the Background Tasks:
This analysis will make your organization 'xxx' to reach the maximum allowed lines limit.
Please contact the administrator of the organization to resolve this issue.
The issue is that it doesn’t say what I need to bump it up to. I have already bumped it up to 1m lines of code and I am still getting the error. Is it just a case of continually bumping it, until it succeeds?
Well the Maximum call stack size exceeded seems like a bug to me, would be interesting to know conditions that reproduce it (isn’t directly tied to Background Task error imo).
And regarding the LOC threshold:
I feel like this needs to be thought through first, too early to jump to solutions right now. ^^ My reasoning: the amount of LOC purchased (and therefore the $$ paid) could be considered a private matter by the org admin, one which the org admin might not necessarily want all project admins to be aware of.
All in all am not saying the current message is ideal (understand the unclarity @gregpakes, and indeed right now you’ll have to iterate gradually), however I would suggest we just track it from there and discuss the appropriate solution ad-hoc. @Fabrice_Bellingard: sounds fair to you ? (@gregpakes: am also thinking that it might be worth for you to make a dedicated #suggestions out of this, to keep it distinct from the initially memory-focused discussion in this topic, and track it from there).
Please contact us on https://sonarcloud.io/about/contact so that you can share the details of your private plan. I will then take a look at the current state of your organization, and if it’s “just” a matter of increasing the number of lines of code for your org, I will guide you on how to make your analyses succeed.