SonarLint for Visual Studio 3.1 发布

SonarLint for Visual Studio 3.1(和 3.1.1)已发布,本次更新了升级了 SonarC# 分析器,并带来了 15 个新规则。

默认情况下启用以下新规则:

  • S2068 – Credentials should not be hard-coded (Vulnerability, CERT, CWE, OSWAP-A2, SANS-Top25-Porous)

  • S1123 – "Obsolete" attributes should include explanations (Code-Smell, Bad-Practice, Obsolete)

  • S4015 – Inherited member visibility should not be decreased (Code-Smell, Pitfall)

  • S4016 – Enumeration members should not be named "Reserved" (Code-Smell)

  • S4019 – Base class methods should not be hidden (Code-Smell, Pitfall)

And the following rules can also be enabled:

  • S3906 – Event Handlers should have the correct signature (Code-Smell, Convention)

  • S3908 – Generic event handlers should be used (Code-Smell)

  • S3909 – Collections should implement the generic interface (Code-Smell)

  • S4017 – Method signatures should not contain nested generic types (Code-Smell, Confusing)

  • S4018 – Generic methods should provide type parameters (Code-Smell)

  • S4022 – Enumerations should have "Int32" storage (Code-Smell)

  • S4023 – Interfaces should not be empty (Code-Smell)

  • S4026 – Assemblies should be marked with "NeutralResourcesLanguageAttribute" (Code-Smell, Performance)

  • S4027 – Exceptions should provide standard constructors (Code-Smell, Convention)

  • S4040 – Strings should be normalized to uppercase (Code-Smell, Pitfall)

SonarC# 的更新也修复了许多错误和误报,并带来了其他的一些改进。

最后,此版本的 SonarLint 修复了一个 bug,阻止了使用 SonarCloud 连接的模式。

有关更多信息,请查看发行说明或访问专用的 SonarLint for Visual Studio 网站。

发布主页

Sonar 不只是一个质量数据报告工具,更是代码质量管理平台。支持的语言包括:Java、PHP、C#、C、Cobol、PL/SQL、Flex 等。

See the article here – 

SonarLint for Visual Studio 3.1 发布