I’m currently testing SonarCloud. Running SonarScanner on our codebase takes 1h 45min for the first run and 45m to 1h for subsequent runs. It’s the same machine, same code, no changes.
Is this expected behaviour?
I’m currently testing SonarCloud. Running SonarScanner on our codebase takes 1h 45min for the first run and 45m to 1h for subsequent runs. It’s the same machine, same code, no changes.
Is this expected behaviour?
Yes, it’s expected that the first analysis takes longer than the subsequent ones.
And it is indeed expected that subsequent analyses still take quite some time because SonarCloud analyses all the source code on every analysis (because a change on one file can impact many other files).
@Fabrice_Bellingard There is no way this is going to be in the critical path (CI pipeline). If we would to use “Quality Gates” for branches with Sonar (something we already do with CodeClimate) then a deployment would take 2-3h instead of 14min.
I have disabled the CPD analyser which brings it down to ~13min just for Sonar.
Out of curiosity, can you give details about the type of repo you are analysing? (number of lines of code, languages).
To complement what I said, analyses on PR are a bit faster than on main branches.