Sonar Java 5.3 发布了,Sonar (SonarQube)是一个开源平台,用于管理源代码的质量。Sonar 不只是一个质量数据报告工具,更是代码质量管理平台。支持的语言包括:Java、PHP、C#、C、Cobol、PL/SQL、Flex 等。SonarQube Java 是Sonar的一个插件,用来分析 Java 代码。 此版本允许使用Java 10构建的项目,它还带有9个附加规则: S4423 - Weak SSLContexts should not be used (Vulnerability, owasp-a6, cwe, sans-top25-porous) S3510 - HostnameVerifier.verify" should not always return true (Vulnerability, owasp-a6, cwe) S4201 - Null check should not be used with instanceof (Code Smell) S4248 - Regex patterns should not be created needlessly (Code Smell, performance) S4274 - Asserts should not be used to check the parameters of a public method (Code Smell, pitfall) S4276 - Functional Interfaces should be as specialised as possible (Code Smell, performance) S2234 - Parameters should be passed in the correct order (Code Smell) S4524 - "default" clauses should be last (Code Smell, misra) S3626 - Jump statements should not be redundant (Code Smell, clumsy) 以下是这些新规则检测到的问题的一些示例: 没有特定版本的TLS则被认为是不安全的。应该使用TLSv1.2。 这里不需要检查null。“instanceof”对于空值返回false。 这些版本还包含多个错误修复,误报修复和改进。请阅读发行说明以获取更多信息。 Sonar JAVA 5.3 发布,支持 Java 10下载地址