简体   繁体   English

Sonarqube 项目依赖图

[英]Sonarqube project dependency graph

I have an existing Jenkins-Sonarqube integration for daily sonar violation check using SonarScanner .我有一个现有的Jenkins-Sonarqube集成,用于使用SonarScanner进行每日声纳违规检查。 Recently there was a discussion to explore a Project Dependency Diagram_ on sonarqube, where I heard about JDepend plugin & tried integrating JDepend plugin in sonarqube and scanned the project.最近有一个讨论在sonarqube探索项目依赖关系图,我在那里听说了 JDepend 插件并尝试在 sonarqube 中集成 JDepend 插件并扫描了项目。

Looking into projects Jdepend measures shows 0 however there are 82 packages found - please find screenshot below : -查看项目 Jdepend 措施显示 0 但是找到了 82 个包 - 请在下面找到屏幕截图: -

截图 1

Can someone suggest on this as I am completely new with project dependency graph or suggest any other plugin (open source/freeware) to achieve my requirement.有人可以对此提出建议,因为我对项目依赖关系图完全陌生,或者建议任何其他插件(开源/免费软件)来实现我的要求。

Sonarqube: 5.6.4  
JDepend: 1.1.1  
Jenkins: 2.89.4

First of, as stated by the report, you are missing all package-info.java files.首先,正如报告所述,您丢失了所有 package-info.java 文件。 See the Github Repo for more information, especially the workaround for missing package-info.java files .有关更多信息,请参阅Github Repo ,尤其是缺少 package-info.java 文件解决方法

Secondly, you need to modify your Java quality profile to also include the jDepend rules.其次,您需要修改您的 Java 质量配置文件以包含 jDepend 规则。 For this, go to Quality Profiles, clone the Sonar way rule set and than go to rules, filter for repository jDepend.为此,转到质量配置文件,克隆声纳方式规则集,然后转到规则,过滤存储库jDepend。 Bulk edit to include jDepend rules.批量编辑以包含 jDepend 规则。

In the end, you need to a new scan with the new rules and package-info.java files.最后,您需要使用新规则和 package-info.java 文件进行新扫描。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM