Current status of Automatic Analysis for Java

SonarCloud’s Automatic Analysis sometimes fails to detect Gradle projects whenever they are stored in a subfolder inside a GitHub repo. For example, this is the root folder structure:

Captura de pantalla 2023-01-03 a la(s) 11.33.18 a.m.

And this are the spring-batch folder contents:

Captura de pantalla 2023-01-03 a la(s) 11.35.41 a.m.

However, this is the result after compatibility checking:

Captura de pantalla 2023-01-03 a la(s) 11.36.35 a.m.

Shouldn’t this be covered by Automatic Analysis?

Hello Daniel and welcome to the Community!

There is a known issue, the content of the pop-up shows a wrong information in some specific cases. We already implemented a fix and we are testing the functionality as we speak. It should be deployed to production in the following days, after that you should be able to see the correct description of why is your project not eligible for Automatic Analysis. I will let you know here once the fix is deployed.

In the meanwhile, is your project using a Monorepo strategy? Because for such repositories, the Automatic Analysis is not supported. More information about this topic is in our Documentation:

Automatic Analysis: Automatic Analysis | SonarCloud Docs
Monorepo support: Monorepo Support | SonarCloud Docs

Peter

Hello again,

The fix to the issue mentioned in my previous message is now deployed in production. If you click on the button “Recheck compatibility”, you should see the correct description now.

Peter

Hi!

This is the new error message that appeared for the first repo I did a recheck:

Is this an expected message?

Hello,

Ok, to be able to investigate more, can you please open a console in your browser, go to Network tab, refresh the Analysis Method window on SonarCloud, find the response of the /api/autoscan/eligibility call and send a screenshot? This screenshot might help you to find it.

Thanks

Hi!

Here’s the screenshot you requested:

We use this GitHub endpoint to find if a repository contains build.gradle file, which is necessary to be present for Autoscan to run. As of today, we look in the root of the repository for the build.gradle file and if it’s not present there, the project is not eligible for Autoscan. In this case it might be necessary to set up a CI-based analysis.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.