Hello,
My code base having multiple modules with around 700+K - when I try to run the Sonar Scanner analysis on the entire code base it was taking around 50 mins and however the server-side analysis completes in under 5 mins.
Below are my configuration details:
Sonar Qube v8.2 Developer Edition
Sonar Scanner Version 3.0.3.778 (Jenkins installation)
Jenkins ver. 2.204.1
Version Control - GIT
It doesn’t make much advantage if I need to spend 50mins for every build which runs for every commit form the developer and it becomes more critical when we run against a PR.
So, I tried to breakup the Sonar scanner analysis per-module basis, even after this one module(biggest of all) is taking around 20mins which doesn’t sound a good work-around. Also, it take around 6 - 7 seconds for a single line analysis, below are the few logs:
INFO: 2183 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for css: Sonar way
INFO: Quality profile for java: DW Java
INFO: Quality profile for js: DW JS Profile
INFO: Quality profile for jsp: FindBugs Security JSP
INFO: Quality profile for ruby: Sonar way
INFO: Quality profile for xml: DW XML Profile
INFO: ------------- Run sensors on module CoreCommerce
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=22ms
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
WARN: Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property.
INFO: JavaClasspath initialization (done) | time=15ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=4ms
INFO: Java Main Files AST scan
INFO: 1703 source files to be analyzed
And, it would be best if we have a incremental analysis which will save lot of time and sadly it was discontinued from Version 5.2.
Could someone help to improve the timing please.
Thanks in advance