Which FxCop rules do you most value? Which rules highlight the best .Net gotchas?
我最喜欢的FxCop规则是在编译代码时不会给我错误的规则。
Which FxCop rules do you most value?
The one I am going to write to stop developers from using #defines instead of configuration ( Quote needed: Preprocessor usage is bad OO practice ). And I like almost all of the design rules.
I find some of the usage and design rules particularly helpful. I can never remember the details of how to implement the IDisposable or ISerializable interfaces, so I appreciate the gentle reminders from rules like these:
我最重视的那些,以及突出问题的是性能规则。
This is not a FxCop rule but NDepend Code Query Language rule , but nevertheless, I love the CQL rule:
// <Name> Make sure refactored and added methods are covered by tests</Name>
WARN IF Count > 0 In SELECT METHODS WHERE
PercentageCoverage < 100
AND (CodeWasChanged OR WasAdded)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.