I'm in the process of upgrading to sonar-scanner v2.5 -> v2.8. I've had a couple issues, but right now the real issue is that the scan is taking a long time. I'm looking for some hits about what I could try to make things run faster - on 2.5 our scan took about 1 hour.
Here's what I've tried so far.
1 - When I upgraded, the the scanner didn't like the the existing sonar.java.libraries
setting. Particularly, it didn't seem to expand the wild cards in the library path. I worked around that by constructing the path explicitly. There are about 400 third-party libraries in our build.
2 - I tried diminishing then eliminating duplicate detection, first via sonar.cpd.java.miniumLines / miniumuTokens
, and then with sonar.cpd.exclusions
.
3- I've also upgrade the sonar server 5.4 -> 5.6.6. When I did that, the number of rules in our quality profile (basically SonarWay + FindBugs Security) jumped from 300 to about 1200 rules. I reset the quality profile.
We have a multi-module setup, with one large module that runs last (6400 classes or so). The last module seems to grind for a long time - I can see the analysis count seems to slow down as the module runs.
Any hints would be great.