如何配置omnisharp合成语法检查器更宽松? [英] How can I configure the omnisharp syntastic syntax checker to be more lenient?

查看:153
本文介绍了如何配置omnisharp合成语法检查器更宽松?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已遵循本指南为c#设置vim.我的工作很漂亮,但是我很烦恼:合成检查器对我来说太苛刻了.具体来说,它建议我更改此行:

I've followed this guide for setting up my vim for c#. I works beautifully, but I've got an annoyance: The syntastic checker is a bit too harsh on me. Specifically it advises me to change this line:

var parser = new Parser(configuration, findReservations: true);

,显示消息冗余参数名称指定".当然,我可以按照它所说的去做,但是我碰巧喜欢我多余的参数说明.我的代码的读者可能不记得该布尔值是什么意思.那么...我该如何告诉Syntastic(或omnisharp)放松这种警告?

with the message "Redundant argument name specification". Of course I COULD just do as it says, but I happen to like my redundant argument specification. The reader of my code might not remember what that boolean is for otherwise. So... how can I tell syntastic (or omnisharp) to relax about this kind of warning?

推荐答案

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

Modify the config.json file in the /bin/Debug folder of the server. On my machine the server is located in ~/.vim/bundle/Omnisharp/server/OmniSharp.

默认配置文件.

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

To ignore this particular issue, add this rule:

"^Redundant argument name specification$"

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

If this is the only rule, besides the default rules, the IgnoredCodeIssues section of the config.js file will look like this:

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

这篇关于如何配置omnisharp合成语法检查器更宽松?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆