【发布时间】:2016-05-27 14:59:16
【问题描述】:
我目前正在开发 Xamarin 移动应用程序,并尝试使用 SonarQube 作为 CI 流程的一部分来加强代码质量。
有人有这方面的经验吗?
到目前为止,通过我的实验,我在使用 SonarLint for Visual Studio 和 StyleCop 时遇到了问题,我不知道这是否是因为这些项目是使用 xbuild 而不是 Visual Studio 或 MSBuild 构建的。
我看到的分类或错误是
Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
这似乎发生在调用 Visual Studio 的 SonarLint 之后。
编辑:
14:59:19.350 INFO - SonarLint for Visual Studio version 1.3.0.0
14:59:20.154 ERROR -
14:59:20.337 ERROR - Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
14:59:20.338 ERROR - at System.Collections.Immutable.ImmutableDictionary`2.get_Item(TKey key)
14:59:20.340 ERROR - at SonarLint.Runner.Configuration.AddAnalyzerCommentRegularExpression(Builder builder)
14:59:20.341 ERROR - at SonarLint.Runner.Configuration.Analyzers()
14:59:20.341 ERROR - at SonarLint.Runner.Program.Main(String[] args)
【问题讨论】:
-
SonarQube Scanner for MSBuild 不支持 xbuild
-
感谢@Dinesh-SonarSourceTeam,您能否解释一下错误消息的含义,以便我思考我们可以做些什么来让某些东西正常工作?
-
除了你看到的,我什么也不能告诉你。如果您可以添加异常的堆栈跟踪,也许我可以为您提供更多详细信息
-
@Dinesh-SonarSourceTeam 添加了堆栈跟踪。
-
我设法找到了这个stackoverflow.com/questions/36013409/…的答案
标签: xamarin sonarqube stylecop sonarlint