SonarLint KeyNotFoundException

怎甘沉沦 提交于 2019-12-12 03:34:54

问题


I'm seeing a strange error when using Sonar to analyse a C-sharp code base.

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)

Can anyone help me identify what key the exeception is refering to?


回答1:


The Sonar server I'm using is shared among many teams so updating the plugin maybe be problematic.

I'm not able to find a file called SonarLint.xml, I have found reference to S124 in a file called analysis-input.xml in .sonar/ in the directory of the project I'm analyzing.

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


来源:https://stackoverflow.com/questions/36013409/sonarlint-keynotfoundexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!