Incremental Scan (Java) Support?

I was wondering if Java supports incremental scanning, where small pieces of code are updated daily but scanning requires scanning the entire project, which can take a lot of time. It would be nice if incremental scans were supported, scanning only the files that have changed.

I saw this function implemented in sonarqube documents. After consulting the developers, they replied that incremental scanning of C, C++ and Java is supported now, but when I actually use Java scanning, IT is still full scanning. May I ask how to implement this function? Also want to know how to implement in other languages.

Here’s what the Sonarqube document says, “Starting from April 2022, and by default, The Java Analyzer Optimizes the analysis of the Unchanged files in pull requests. ”Is it true that it is now possible to scan only changed or increased files, or is it only optimized for speed?

Thank you very much. This post from machine translation, if the wording is inappropriate, please forgive me.

Only analyzing changed Java files began to be supported in SonarQube v9.4 in the context of pull requests only.

We expect more speed improvements (and incremental analysis in the context of your main branch and other branches) later in the v9.x series.

How can I do incremental scan? Note that I said scan and not analysis, I looked at the scan log, and after modifying and adding files, the scan log was the same as the first scan. If incremental scan is supported, how do I perform this operation?

Hey there.

I’m not sure what distinction you’re drawing between scan and analysis.

An incremental scan is available specifically for Java files in the context of pull request using Pull Request Analysis in Developer Edition+ of the latest version of SonarQube. Is this the case for your project?

Thanks for the answer.

I would like to ask if unaltered files will be skipped when scanning, which would save a lot of time.