Sonarqube 4.5.1 - 0索引的文件

时间:2015-01-21 13:30:26

标签: sonarqube sonar-runner

我想用sonarqube 4.5.1和sonar-runner 2.4分析putty源代码。

要启动服务器,我从执行 StartSonar.bat E:\ BA_MW \ sonarqube-4.5.1 \ sonarqube-4.5.1 \ BIN \ windows的X86-32

要分析的源文件位于
E:\ BA_MW \项目\油灰0.63 \ putty_source

sonar-project.properties 位于
E:\ BA_MW \项目\油灰0.63
看起来像这样:

sonar.projectKey=my:project
sonar.projectName=Putty_Sonar_X
sonar.projectVersion=1.0

sonar.sources=putty_source

sonar.sourceEncoding=UTF-8

sonar.my.property=value

也来自 的 E:\ BA_MW \项目\油灰0.63
我执行 sonar-runner.bat

这就是我得到的:

E:\BA_MW\Projects\putty-0.63>sonar-runner.bat
E:\BA_MW\sonarqube-4.5.1\sonar-runner-dist-2.4\sonar-runner-2.4
SonarQube Runner 2.4
Java 1.7.0_03 Oracle Corporation (64-bit)
Windows 7 6.1 amd64
INFO: Runner configuration file: E:\BA_MW\sonarqube-4.5.1\sonar-runner-dist-2.4\sonar-runner-2.4\conf\sonar-runner.properties
INFO: Project configuration file: E:\BA_MW\Projects\putty-0.63\sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: E:\BA_MW\Projects\putty-0.63\.\.sonar
INFO: SonarQube Server 4.5.1
13:51:13.072 INFO  - Load global referentials...
13:51:13.197 INFO  - Load global referentials done: 140 ms
13:51:13.213 INFO  - User cache: C:\Users\admin\.sonar\cache
13:51:13.213 INFO  - Install plugins
13:51:13.337 INFO  - Install JDBC driver
13:51:13.337 INFO  - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
13:51:14.494 INFO  - Initializing Hibernate
13:51:15.867 INFO  - Load project referentials...
13:51:16.101 INFO  - Load project referentials done: 234 ms
13:51:16.101 INFO  - Load project settings
13:51:16.616 INFO  - Loading technical debt model...
13:51:16.647 INFO  - Loading technical debt model done: 31 ms
13:51:16.662 INFO  - Apply project exclusions
13:51:16.834 INFO  - -------------  Scan Putty_Sonar_X
13:51:16.850 INFO  - Load module settings
13:51:17.146 INFO  - Loading rules...
13:51:17.661 INFO  - Loading rules done: 515 ms
13:51:17.708 INFO  - Configure Maven plugins
13:51:17.848 INFO  - Compare to previous analysis (2015-01-21)
13:51:17.879 INFO  - Compare over 30 days (2014-12-22, analysis of 2014-12-23 13:18:42.154)
13:51:17.879 INFO  - No quality gate is configured.
13:51:18.035 INFO  - Base dir: E:\BA_MW\Projects\putty-0.63\.
13:51:18.035 INFO  - Working dir: E:\BA_MW\Projects\putty-0.63\.\.sonar
13:51:18.035 INFO  - Source paths: putty_source
13:51:18.035 INFO  - Source encoding: UTF-8, default locale: en_US
13:51:18.035 INFO  - Index files
13:51:18.316 INFO  - 0 files indexed
13:51:18.332 INFO  - Sensor QProfileSensor...
13:51:18.347 INFO  - Sensor QProfileSensor done: 15 ms
13:51:18.347 INFO  - Sensor InitialOpenIssuesSensor...
13:51:18.363 INFO  - Sensor InitialOpenIssuesSensor done: 16 ms
13:51:18.363 INFO  - Sensor ProjectLinksSensor...
13:51:18.363 INFO  - Sensor ProjectLinksSensor done: 0 ms
13:51:18.363 INFO  - Sensor VersionEventsSensor...
13:51:18.378 INFO  - Sensor VersionEventsSensor done: 15 ms
13:51:18.378 INFO  - Sensor FileHashSensor...
13:51:18.378 INFO  - Sensor FileHashSensor done: 0 ms
13:51:18.378 INFO  - Sensor CPD Sensor (wrapped)...
13:51:18.378 INFO  - Sensor CPD Sensor (wrapped) done: 0 ms
13:51:18.690 INFO  - Execute decorators...
13:51:18.800 INFO  - Store results in database
13:51:18.878 INFO  - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/my:project
13:51:18.940 INFO  - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
13:51:18.940 INFO  - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
13:51:18.956 INFO  - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
13:51:18.971 INFO  - -> Keep one snapshot per day between 2014-12-24 and 2015-01-20
13:51:18.971 INFO  - -> Keep one snapshot per week between 2014-01-22 and 2014-12-24
13:51:18.971 INFO  - -> Keep one snapshot per month between 2010-01-27 and 2014-01-22
13:51:18.971 INFO  - -> Delete data prior to: 2010-01-27
13:51:18.971 INFO  - -> Clean Putty_Sonar_X [id=1]
13:51:18.987 INFO  - <- Clean snapshot 115
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 6.585s
Final Memory: 17M/522M
INFO: ------------------------------------------------------------------------

请注意 13:51:18.316 INFO - 0个文件已编入索引
在localhost上运行的sonarqube仪表板显示得很好,但当然没有数据,因为没有实际分析。

我不知道我做错了什么。

祝你好运

玛蒂

1 个答案:

答案 0 :(得分:3)

Putty是用C语言编写的,所以我猜你没有在SonarQube安装上安装C/C++ plugin

默认情况下,SonarQube仅提供Java支持。