目前我使用的是最新版本 5.0 的 SonarQube.
Currently i am using SonarQube with latest version 5.0 .
我正在使用 SonarQube 扫描带有 PHP 插件的 PHP 项目.
I am using SonarQube for scanning PHP projects with PHP plugin.
现在有一些关于 SonarQube 和 PHP 插件的查询.
Now there some queries which i having regarding SonarQube and PHP Plugin.
预先感谢您的回答.
在对 SonarQube 编码标准做了大量研究之后,我得出了以下结论.
After doing so much research for SonarQube Coding Standards i came to following conclusion.
请在下面找到我对我之前提出的问题的评论.
please find below my comments for the questions that i asked previously.
出于一些安全原因,SonarQube 人修改了插件并从 PHP 插件中删除了配置部分.但是,配置部分是 JAVA(SonarQube 5.0 版)的配置部分
Because of some security reasons, SonarQube guys modified the plugin and removed the configuration part from PHP plugin. However, the configuration part is till present for JAVA(SonarQube version 5.0)
是的,我们可以使用 SonarQube 扫描 Drupal 项目.这在 SonarQube 5.1 版之后是可能的,他们为 Drupal 项目提供了单独的质量配置文件.分析时将该配置文件设置为默认值.
Yes, We can scan Drupal projects with SonarQube. This is possible after SonarQube version 5.1 where they have provided a separate Quality profile for Drupal Projects. set that profile as default while analyzing.
此外,您还必须在项目属性文件中使用文件后缀.
Also you have to used file suffixes within your project properties file.
sonar.php.file.suffixes= file extensions that you have to scan
PHP 插件扫描的默认扩展名是 php,php3,php4,php5,phtml,inc
作为 Drupal 包含扩展名为 .moudle 和 .install 的文件.要使 Sonar 能够分析这些文件,您必须在上述密钥中添加相同的内容.
Default extensions scanned by PHP Plugins are php,php3,php4,php5,phtml,inc
As Drupal Contains files with extension such as .moudle and .install. To enable Sonar to analyze these files, you have to add the same in above mentioned key.
您还可以使用 Dashboard 启用此功能,您可以在其中全局设置 PHP 插件中的相同属性.
You can also enable this using Dashboard where you can globally set the same properties within PHP plugin.
如果您不想使用声纳,还有另一种选择.我正在使用 Coder(Drupal 的静态代码分析工具)并将其与 Jenkins 集成.通过 ANT/Phing,我正在触发静态代码分析并生成各种报告并显示在 Jenkins Dashboard 中.
There is one more alternative, if you don't want to use Sonar. I am using Coder(Static code analysis tool for Drupal) and integrating the same with Jenkins. Through ANT/Phing i am triggering the static code analysis and generate various reports and displayed in Jenkins Dashboard.
这篇关于用于 Drupal 项目的 SonarQube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!