代碼質量管理 開源平臺 SonarQube Java v3.14 發布
Sonar是一個用于代碼質量管理的開源平臺,用于管理Java源代碼的質量。通過插件機制,Sonar 可以集成不同的測試工具,代碼分析工具,以及持續集成工具,比如pmd-cpd、checkstyle、findbugs、Jenkins。通過不同的插件對這些結果進行再加工處理,通過量化的方式度量代碼質量的變化,從而可以方便地對不同規模和種類的工程進行代碼質量管理。同時 Sonar 還對大量的持續集成工具提供了接口支持,可以很方便地在持續集成中使用 Sonar。 此外,Sonar 的插件還可以對 Java 以外的其他編程語言提供支持,對國際化以及報告文檔化也有良好的支持。
更新日志
Bug修復
- [SONARJAVA-1548] - FP on S2391 about naming of methods and visibility
- [SONARJAVA-1635] - FP S1854 : Dead store in try with resource
- [SONARJAVA-1636] - Getters returning Boolean (wrapper type) are not considered as being public API
- [SONARJAVA-1637] - SE: Exploded graph walker is executing method declared in anonymous classes
- [SONARJAVA-1639] - Parametrized methods: substitution validation blocked in infinite loop
- [SONARJAVA-1647] - Rules Profile should be loaded from dedicated JSON
- [SONARJAVA-1648] - NPE on S2637 on void method annotated with @Nonnull using empty return statement
- [SONARJAVA-1653] - S1217 should only target subclasses of Thread, and not all the subclasses of Runnable
- [SONARJAVA-1658] - FP on S2699: The rule should handle Mockito verifyZeroInteractions
- [SONARJAVA-1659] - FP on S1153 String.valueOf(char[]) should not raise an issue
- [SONARJAVA-1660] - NPE on CallToDeprecatedMethod S1874 when no semantic available
- [SONARJAVA-1662] - FP on S1641 : Collections.unmodifiableSet returns a view of the correct set
- [SONARJAVA-1665] - FP on S3398 : constructors should be excluded
- [SONARJAVA-1671] - Semantic: Strict arity invocation on variadic method is wrong
- [SONARJAVA-1675] - Constructors of a non-private inner member class have an implicit first formal parameter with type of the immediately enclosing class
- [SONARJAVA-1676] - inner interfaces should be static
- [SONARJAVA-1677] - Type inference in wildcard bounds
- [SONARJAVA-1679] - Semantic: infering on defered type lead to unresolved method
- [SONARJAVA-1690] - FP on S1481 : unused variable from try-with-resources should be ignored
- [SONARJAVA-1694] - Checking linear sqale should not fail if there are no json file nor sqale annotation
- [SONARJAVA-1695] - NPE on S2142: interrupted exception check should not fail when encountering unknownSymbol
- [SONARJAVA-1696] - XML secondary locations are creating empty text span
改進
- [SONARJAVA-877] - Resolve method of method reference
- [SONARJAVA-1478] - FP on S2095 : Close resource should not raise issue on Autocloseable resource not holding resource
- [SONARJAVA-1581] - Parametrized methods: return type not correctly inferred when depending of the call site
- [SONARJAVA-1615] - Introduce issue filtering mechanism to avoid modifying multiple rules when handling frameworks
- [SONARJAVA-1642] - Filter issues related to Lombok annotations with a dedicated issue filter
- [SONARJAVA-1643] - Make the current SupressWarning issue filter rely on new filtering process
- [SONARJAVA-1644] - Type of Lambda expression should be infered properly
- [SONARJAVA-1645] - Type of parameters of lamdba expression should be properly infered
- [SONARJAVA-1649] - NPE are not detected in throw statement
- [SONARJAVA-1656] - FP on S2440: all supertypes should be checked, not only super class
- [SONARJAVA-1657] - Type inference should also be applied to constructors when diamond operator is used
- [SONARJAVA-1664] - FP on S1994 : no issue should be raised if the stop condition is omitted
- [SONARJAVA-1668] - Type of functional interface should respect JLS for wildcards
- [SONARJAVA-1669] - Update Rule S2333: add 'private' on enum constructor
- [SONARJAVA-1672] - Update Rule S2384 to ignore unmodifiable Collections
- [SONARJAVA-1673] - S2699 should support easyMock
- [SONARJAVA-1674] - Type parameters are ignored when resolving constructor with enclosing expression
- [SONARJAVA-1684] - Visit of innerclass from bytecode should not trigger completion of outer class to get flags
新特性
- [SONARJAVA-1594] - Rule S2886: Getters and setters should be synchronized in pairs
- [SONARJAVA-1597] - Rule S899: Return values should not be ignored when they contain the operation status code
- [SONARJAVA-1599] - Rule S3020: "toArray" should be passed an array of the proper type
- [SONARJAVA-1600] - Rule S2141: Classes that don't define "hashCode()" should not be used in hashes
Task
- [SONARJAVA-1431] - Handle rule metadata in external files
- [SONARJAVA-1638] - Upgrade SQ Api to 4.5.7
- [SONARJAVA-1661] - Expression statement should not have a type
- [SONARJAVA-1693] - Upgrade to parent pom 32
Sub-task
- [SONARJAVA-1640] - Filter issues of S1444 and ClassVariableVisibilityCheck when dealing with Eclipse I18N framework
下載
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!