使用FxCop和StyleCop [英] Using FxCop and StyleCop

查看:107
本文介绍了使用FxCop和StyleCop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经阅读了大约一天的信息以及FxCop和StyleCop的用法.但是我也想发表您的意见吗?使用这两个程序对您很有用,也很重要.如果您能与我分享您的想法,我将是格拉斯.

感谢

Hello all,

I have been reading information and the usage of FxCop and StyleCop for a day or so. But I also would like to have your opinions? You useful and important to use these two programs. I will be glas if you can share your thoughts with me.

Thanks

推荐答案

首先,关于FxCop.如果您批判性地考虑这一点,我认为这将非常有用.您当然需要调整规则集并自定义一些规则以获得合理的检查.我认为,不能使用某些规则,因为它们只是白痴.我在过去的回答中列举了一些带有参数的示例:

FXCop-您如何认真对待它? [ ^ ].

另请参阅OP Joe_Dert和Andreas Gieriet的观点-它们很有趣而且很有意义.基本上,我们都同意.

现在,StyleCop.这是完全不同的事情.我认为没有理由推荐它.我厌恶地测试了一次.它比FxCop差很多.这样的改进"如何:using子句按字母顺序重新排序.我倾向于从低层到应用层按语义对它们进行分组.我们人类从语义,位置等方面记住事物.对于字母搜索,有一个搜索"对话框.还有许多其他愚蠢的事情.我无法想象它有什么帮助以及为什么.但是,我可以想象有人会喜欢它.

样式只能与支持代码维护一样好.

好吧,你自己看看.

—SA
First, about FxCop. I think it is a very useful if you take is critically. You certainly need to adjust the rule sets and customize some rule to get a reasonable check. In my opinion, some rules cannot be used because they are simply idiotic. I give some example with argument in my past answer:

FXCop - How seriously do you take it?[^].

Please also see the opinion of OP Joe_Dert and Andreas Gieriet — they are interesting and make sense. Basically, we all agree.

Now, StyleCop. This is a very different thing. I see no reason to recommend it. I tested it just once to through out in disgust. It''s much worse than FxCop. How about such "improvement": using clauses are re-sorted alphabetically. I tend to sort group them semantically, from lower level to application level. We human being remember things semantically, positionally, etc. For alphabetic search, there is a Search dialog. Many other stupid things. I cannot imaging how can it help and why. However, I can imagine some people who might like it.

Style can only be as good as it supports maintenance of the code.

Well, see by yourself.

—SA


这篇关于使用FxCop和StyleCop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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