我目前正在开发 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)