如何配置omnisharp syntastic语法检查器更宽松?

piu*_*ius 6 c# vim syntastic omnisharp

我已按照本指南设置我的v#c#.我工作得很漂亮,但我有一个烦恼:合成检查对我来说有点过于苛刻.具体来说,它建议我改变这一行:

var parser = new Parser(configuration, findReservations: true);
Run Code Online (Sandbox Code Playgroud)

消息"冗余参数名称规范".当然我可以像它说的那样做,但我碰巧喜欢我的冗余参数规范.我的代码的读者可能不记得该布尔值是什么.所以...我怎么能告诉syntastic(或omnisharp)放松这种警告?

jas*_*oni 5

修改服务器文件夹config.json中的/bin/Debug文件.在我的机器上,服务器位于~/.vim/bundle/Omnisharp/server/OmniSharp.

您将在默认配置文件中看到一些示例忽略的代码问题.

要忽略此特定问题,请添加以下规则:

"^Redundant argument name specification$"
Run Code Online (Sandbox Code Playgroud)

如果这是唯一的规则,除了默认规则之外,config.js文件的IgnoredCodeIssues部分将如下所示:

"IgnoredCodeIssues": [
  "^Keyword 'private' is redundant. This is the default modifier.$",
  ".* should not separate words with an underscore.*",
  "^Redundant argument name specification$" 
],
Run Code Online (Sandbox Code Playgroud)