简体   繁体   English

Grails/groovy 项目的静态代码分析

[英]Static code analysis for Grails/groovy project

If I use sonarqube as static code analysis tool for grails project after installing groovy plugin in sonar, then does it also internally use codenarc or do i have to use codenarc analysis of project separately using codenarc plugin in grails?如果我在 sonar 中安装 groovy 插件后使用 sonarqube 作为 grails 项目的静态代码分析工具,那么它是否也在内部使用 codenarc 或者我是否必须使用 grails 中的 codenarc 插件单独使用项目的 codenarc 分析?

Basically, is sonarqube sufficient for static code analysis or should i also use codenarc?基本上,sonarqube 是否足以进行静态代码分析,还是应该使用 codenarc?

Sonar groovy plugin relies on codenarc to do its analysis. Sonar groovy 插件依赖于 codenarc 进行分析。 So using SonarQube or Codenarc is just a matter of how you want your results to be displayed and/or if you want to share tracking of issues in your code with your team.因此,使用 SonarQube 或 Codenarc 只是您希望如何显示结果和/或是否希望与您的团队共享代码中问题的跟踪问题。 In the end, you should have the same results but SonarQube will bring you more functionality to track issues.最后,您应该得到相同的结果,但 SonarQube 将为您带来更多跟踪问题的功能。

If you need to also format & fix your groovy files, you can use :如果您还需要格式化和修复您的 groovy 文件,您可以使用:

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

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