Is the a way to analyze code on the cloud, not on the local PC

Hi,

I know how to analyze code dy downloading SonarQube to the local PC. Is there a way to trigger analysis on the cloud itself by uploading code to cloud or directly from GitHab?

Thanks.

Hello Valeriy,

Yes, SonarCloud can analyze your code that lives in GitHub and you don’t need to install anything locally. Additionally, SonarCloud is free for public projects.

It’s easy to get started on SonarCloud by signing in with your GitHub credentials. On the login page, just click on the “Log in with GitHub” button.

If you want to automatically trigger code analysis on GitHub, you just need to launch it inside your existing CI scripts. Please follow the tutorial to get started.

Thanks!

It sounds great! thanks a lot )

Hello @Clint.Cameron,

I have SonarCloud integrated with bitbucket and I did the following.

  1. Create a project in SonarCloud.
  2. Generate a token.
  3. Select project technology, PHP.
  4. Select OS - Windows
  5. Download and setup SonarCube CLI scanner
  6. Execute the bat (see below)

INFO: Load server rules (done) | time=11292ms
INFO: Index files
INFO: 2 files indexed
INFO: Sensor SonarJavaXmlFileSensor [java]
INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=22ms
INFO: Sensor JavaSecuritySensor [security]
INFO: UCFGs: 0, excluded: 0, source entrypoints: 0
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=10ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: UCFGs: 0, excluded: 0, source entrypoints: 0
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
INFO: No SCM system was detected. You can use the ‘sonar.scm.provider’ property to explicitly specify it.
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 139ms, dir size=56 KB
INFO: Analysis reports compressed in 33ms, zip size=17 KB
INFO: Analysis report uploaded in 1406ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://sonarcloud.io/dashboard?id=xxxxx
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=xxx
INFO: Task total time: 40.524 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 3:12.969s
INFO: Final Memory: 28M/186M

When check the result, i see nothing.

Please advise.

Please do not reuse existing threads to ask questions that do not relate to the topic. Create a new topic instead, thanks.

Is there a way to analyze the code with SonarCloud without github or bitbucket? just by uploading code via APIs to SonarCloud?

Hi Sergii,

:wave: Welcome to the SonarSource Community! :tada:

First, let me ask if there’s a reason you wouldn’t want your code on GH or BB, which would make it easily accessible to SonarCloud? Do you wish to keep it private?