SonarLint KeyNotFoundException

SonarLint KeyNotFoundException

我在使用 Sonar 分析 C-sharp 代码库时看到一个奇怪的错误。

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)

谁能帮我确定异常指的是哪个键?

我使用的 Sonar 服务器由许多团队共享,因此更新插件可能会出现问题。

我找不到名为 SonarLint.xml 的文件,我在项目目录中的 .sonar/ 中的名为 analysis-input.xml 的文件中找到了对 S124 的引用我'我正在分析。

<Rule>
  <Key>S124</Key>
  <Parameters>
    <Parameter>
      <Key>RuleKey</Key>
      <Value>ToDo</Value>
    </Parameter>
  </Parameters>
</Rule>