“Analysis collector” or “SONAR” for Jenkins?

2019-04-16 06:23发布

I'm looking at adding static code analysis to our Jenkins builds of a Java project (~500K lines of code).

Two possibilities are Analysis Collector or SONAR.

One advantage of SONAR looks to be it can show dead code and deprecated methods.

Recommendations?

2条回答
爷、活的狠高调
2楼-- · 2019-04-16 06:46

Sonar is not just a tool to integrate other tools in a unified environment. First with Sonar you can analyze not just Java source code but code developed in more than 20 languages. http://www.sonarsource.com/products/plugins/languages/

Then the star feature of Sonar is the differential views where you can see how the quality of your code is evolving over time. To be honest this can't be done by using these tools in separately. http://docs.codehaus.org/display/SONAR/Differential+Views

Furthermore you can create code reviews and integrate it with Jira (if you use it) and benefit from over 40 open source and commercial plugins that add more features into your Sonar installation.

So IMHO the two tools you mention can't be even compared! And I'd definitely suggest Sonar

查看更多
Rolldiameter
3楼-- · 2019-04-16 06:55

SONAR

In more words: I would recommend to separate building and reporting tasks. Different functions should be done by different systems (Like Separation_of_concerns principle). I had build failing a lot of times, just because I was configuring Analysis Collector reports. Secondly you can start SONAR analysis from local PC or any other server.

查看更多
登录 后发表回答