本文介绍了SonarQube 从 4.2 升级到 4.3 后不分析文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将 sonarqube 4.2 升级到 4.3 后,我收到以下消息:

After the upgrade of sonarqube 4.2 to 4.3 i'm getting this message:

13:15:18.349 WARN - 文件%s"被忽略.它不在模块 basedir '%s' 中.[重复(假设)我所有的 c# 文件]

13:15:18.349 INFO - 0 个文件被索引

13:15:18.349 INFO - 0 files indexed

我们从 msbuild 运行 sonar,并传入(以及其他)命令行参数:-D sonar.sources="../../Source/"

We run sonar from msbuild, and pass in (among others) the command line argument: -D sonar.sources="../../Source/"

正确解析的完整路径可以在日志中看到

Which is correctly resolved the full path is can see in the logging

输出显示

C:projectsmyprojectuildToolsSonarRunner.2.3in..

SonarQube Runner 2.3

SonarQube Runner 2.3

Java 1.7.0_51 甲骨文公司(64 位)

Java 1.7.0_51 Oracle Corporation (64-bit)

Windows 8 6.2 amd64

Windows 8 6.2 amd64

INFO:运行器配置文件:C:projectsprojectuildToolsSonarRunner.2.3in..confsonar-runner.properties

INFO: Runner configuration file: C:projectsprojectuildToolsSonarRunner.2.3in..confsonar-runner.properties

信息:项目配置文件:无

INFO: Project configuration file: NONE

INFO:默认语言环境:en_GB",源代码编码:UTF-8"

INFO: Default locale: "en_GB", source code encoding: "UTF-8"

INFO:工作目录:C:projectsprojectBuildScripts.sonar

INFO: Work directory: C:projectsprojectBuildScripts.sonar

信息:SonarQube 服务器 4.3

INFO: SonarQube Server 4.3

13:13:43.706 INFO - 加载批处理设置

13:13:43.706 INFO - Load batch settings

13:13:43.924 信息 - 用户缓存:C:Usersusername.sonarcache

13:13:43.924 INFO - User cache: C:Usersusername.sonarcache

13:15:16.155 INFO - 未配置质量门.

13:15:16.155 INFO - No quality gate is configured.

13:15:16.356 信息 - 基本目录:C:projectsprojectBuildScripts

13:15:16.356 INFO - Base dir: C:projectsprojectBuildScripts

13:15:16.356 信息 - 工作目录:C:projectsprojectBuildScripts.sonar

13:15:16.356 INFO - Working dir: C:projectsprojectBuildScripts.sonar

13:15:16.356 信息 - 源目录:C:projectsprojectSource

13:15:16.356 INFO - Source dirs: C:projectsprojectSource

13:15:16.356 INFO - 源编码:UTF-8,默认语言环境:en_GB

13:15:16.356 INFO - Source encoding: UTF-8, default locale: en_GB

13:15:16.356 INFO - 索引文件

13:15:16.356 INFO - Index files

13:15:16.358 信息 - 排除的测试:

13:15:16.358 INFO - Excluded tests:

13:15:16.358 信息 - /.IntegrationTests//.*

13:15:16.358 INFO - /.IntegrationTests//.*

13:15:16.358 信息 - /.UnitTests//.*

13:15:16.358 INFO - /.UnitTests//.*

13:15:17.287 WARN - 文件%s"被忽略.它不位于基于模块r '%s'.

13:15:17.287 WARN - File '%s' is ignored. It is not located in module basedi r '%s'.

关于如何解决这个问题的任何建议?

Any suggestions on how to solve this?

推荐答案

可能会有所帮助(更新:网址不再可用:替代)

This may help (update: url no longer available: Alternative)

"特殊情况可以指定模块基目录默认情况下,模块基目录是从模块标识符中猜测的(如上面的示例中所示).但可以使用 sonar.projectBaseDir 属性重新定义它."

"Module base directory can be specified for special casesBy default, the module base directory is guessed from the module identifier (like in the examples above). But it can be redefined using the sonar.projectBaseDir property."

这篇关于SonarQube 从 4.2 升级到 4.3 后不分析文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 21:31