使用声纳分析源代码

发布于 2024-09-16 05:59:26 字数 97 浏览 2 评论 0原文

是否可以直接从 svn 存储库获取源代码并使用声纳进行分析?或者配置声纳只是为了针对某些源运行 Checkstyle 或 pmd 插件? 我需要在非 Maven 项目上执行此操作。

It is possible to take the source code directly from a svn repository and analyze it with sonar? Or configure sonar just to run a Checkstyle or pmd plugin for certain sources?
I need to do this on non-maven projects.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神回复 2024-09-23 05:59:26

Sonar 完全可以在没有 Maven 的情况下运行。现在有声纳跑步者

Sonar can run without maven entirely. Now there's sonar-runner

变身佩奇 2024-09-23 05:59:26

是的,你只需要编写一个maven或ant脚本先从SVN检查最新的,然后运行sonar:sonar命令。

看起来 Sonar 强制您创建 pom.xml 文件并安装 maven2,即使对于非 mavenized 项目也是如此: http://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code

(仅供参考 - Sonar 对于一个成熟的项目来说非常简单,但在任何设置中,关键是养成查看和使用声纳结果来改进开发的习惯。)

Yes, you just need to write a maven or ant script to check out the latest from SVN first, then run the sonar:sonar command.

It looks like Sonar forces you to create a pom.xml file and install maven2, even for a non-mavenized project: http://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code

(fyi - Sonar is dead easy with a mavenized project, but in any setup the key will be in getting in the habit of looking at and using the results of Sonar to improve development. That's the hard part.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文