SonarLint for Visual Studio 1.8 发布
欢迎加入运维网交流群:263444886SonarSource 很高兴的宣布 SonarLint for Visual Studio 1.8 版本发布。该版本嵌入 7 个新的 C# 规则,提升了其他的规则,同时修复了社区报告的一些 bug。
在 1.7 版本后新增的规则如下:
[*] “==” should not be used when “Equals” is overridden
Example from project Akka:
commander has an interface type, so == will resolve to a reference equality check, but an implementation of that interface overrides object.Equals,
so there is a high chance that value equality should have been used.
[*] Parameters with “” attributes should also be ““
[*] “” should not be used with “ref” or “out”
[*] Optional parameters should have the same default value in overrides
[*] Possible loss of fraction
[*] “default” clause of a “switch” should not be empty
[*] Implementations should be provided for “partial” methods
此外改进了下列规则:
[*] Methods with caller info attributes should not be invoked with explicit arguments does not report on cases when the passed value is also a parameter with caller info attribute.
[*] Runtime type checking should be simplified now reports correctly on IsAssignableFrom calls.
[*] “Explicit” conversions of “foreach” loops should not be used only reports on foreach statements on generic collections.
[*] Culture should be specified for String operations now also handles StringComparison arguments.
[*] “IEnumerable” LINQs should be simplified doesn’t report false positives on ToList() calls.
详情请看> Have fun with SonarLint!
页:
[1]