论坛首页 综合技术论坛

代码质量管理开源平台Sonar

浏览 2862 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2016-01-05  
文章已迁移到新地址

    http://blog.dinghz.com/2016/01/05/sonar.html

Sonar官网

    http://www.sonarqube.org/

Sonar介绍

Sonar (SonarQube)是一个开源平台,用于管理源代码的质量。Sonar 不只是一个质量数据报告工具,更是代码质量管理平台。支持的语言包括:Java、PHP、C#、C、Cobol、PL/SQL、Flex 等。
Sonar数据库创建

<pre name="code" class="sql">
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';</pre>

Sonar数据库配置

配置文件:${SONAR_HOME}/conf/sonar.properties

<pre name="code" class="xml">
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true&amp;useConfigs=maxPerformance</pre>

中文语言包

    https://github.com/SonarQubeCommunity/sonar-l10n-zh

<pre name="code" class="xml">maven package</pre>

通过maven对sonar-l10n-zh项目进行打包,这里使用的是1.9-SNAPSHOT版本,生成的jar包是sonar-l10n-zh-plugin-1.9-SNAPSHOT.jar,将sonar-l10n-zh-plugin-1.9-SNAPSHOT.jar拷贝到${SONAR_HOME}/extensions/plugins/目录下
启动脚本

启动脚本在${SONAR_HOME}/bin/目录下,请自己选择相应的系统启动脚本进行运行
Web界面地址

    http://127.0.0.1:9000/

Sonar界面


Demo工程

    https://github.com/craneding/sonar-test

这是我个人写的demo工程,具体的使用请看github的工程说明
   发表时间:2016-01-08  
和intellij怎么集成?
0 请登录后投票
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics