Releases: SonarSource/sonar-kotlin
2.18.0
2.17.0.2902
Release notes - SonarKotlin - 2.17
Task
SONARKT-355 Update rules metadata with CCT classification
SONARKT-356 CCT support using sonar-analyzer-commons 2.7 and sonar-plugin-api 10.1
Improvement
SONARKT-350 Upgrade to Kotlin 1.9
2.16.0
Release notes - SonarKotlin - 2.16
Bug
SONARKT-334 Multiline comments inside functions are counted as Lines of Code
New Feature
SONARKT-317 Implement rule S6626: Tasks should define "description" and "group"
SONARKT-320 Implement rule S6623: "tasks.register()" should be preferred over "tasks.create()"
SONARKT-322 Implement rule S6624: Dependency versions shouldn't be hard-coded
SONARKT-323 Implement rule S6629: Dependencies should be grouped by destination
SONARKT-327 Implement rule S6631: Gradle settings file should always be present
SONARKT-328 implement rule S6625: "rootProject.name" should always be present in Gradle settings
SONARKT-332 Implement rule S6634: Core plugins IDs should be replaced by their shortcuts
SONARKT-335 Add .kts as default language extension along with .kt
Task
SONARKT-336 Split sonar-kotlin into modules
SONARKT-337 Add a GradleSensor that will visit .gradle.kts files
SONARKT-340 Add test framework for KotlinGradleSensor checks
SONARKT-344 Add a task to generate stubs for Gradle Kotlin rules
SONARKT-345 Disable Kotlin rules for Kotlin scripts
Improvement
SONARKT-347 Update Rules Metadata
SONARKT-348 Update Linter Bindings
2.15.0
Release notes - SonarKotlin - 2.15
Bug
SONARKT-306 Exception in the rule S2175: CollectionInappropriateCalls when used with typed arrays
SONARKT-313 Potential StackOverflow in VoidShouldBeUnitCheck (S6508) due to recursive star projection
False-Positive
SONARKT-251 Fix FP in rule S1186 when @Suppress("DEPRECATION") is used
SONARKT-314 S6517: common FP when an interface has a parent
New Feature
SONARKT-119 Rule S6207: Redundant functions should be avoided in data classes
SONARKT-282 Implement rule S6530: Type casts should make sense
SONARKT-288 Implement rule S6531: Type casts and checks shouldn't be redundant
SONARKT-292 Implement rule S6515: Singleton pattern should use object declarations or expressions
SONARKT-294 Implement rule S6558: "It" shouldn't be used as a lambda parameter name
SONARKT-295 Implement rule S6615: Variables assigned values should be read
SONARKT-296 Implement rule S6532: "check" or "require" should be used for preconditions
SONARKT-297 Implement rule S6529: "isEmpty", "isNotEmpty" should be used to check the size
SONARKT-298 Implement rule S6611: `Map` values should be accessed safely
Improvement
SONARKT-279 Plugin MANIFEST should declare the JRE version requirement
SONARKT-312 Allow issue messages code highlighting
SONARKT-315 Update rules metadata
SONARKT-316 Update external linters
2.14.0.2352
Release notes - SonarKotlin - 2.14
Bug
SONARKT-267 CPD tokens of unchanged files are not reported during Kotlin incremental branch analysis
SONARKT-271 The Kotlin analyzer distinguishes between changed and unchanged in files in PR context
False-Positive
SONARKT-307 FP in S1128 (Unused import) in case if delegate is a local variable
New Feature
SONARKT-281 Implement rule S6510: "return" statements should be lifted before "if" or "when" statement
SONARKT-283 Implement rule S6511: "When" statements should be used instead of chained "if" statements
SONARKT-284 Implement rule S6508: "Unit" should be used instead of "Void"
SONARKT-285 Implement rule S6518 : Element access should use indexed access operators
SONARKT-287 Implement rule S6512: Getter and setter pattern should use property getters and setters
SONARKT-289 Implement rule S6519: Structural equality tests should use "==" or "!="
SONARKT-290 Implement rule S6517: Single function interfaces should be functional interfaces
SONARKT-291 Implement rule S6516: Functional interface implementations should use lambda expressions
SONARKT-293 Implement rule S6514: Delegator pattern should use "by" clause
Task
SONARKT-309 Update rules and external linters metadata
SonarKotlin 2.12.1
Bugs
SONARKT-267(CPD tokens of unchanged files are not reported during incremental branch analysis
SONARKT-271 The Kotlin analyzer distinguishes between changed and unchanged in files in PR context
2.13.0.2116
Release notes - SonarKotlin - 2.13
Task
SONARKT-278 Update rules metadata
Improvement
SONARKT-244 Improve Android Project detection
SONARKT-274 Upgrade to Kotlin 1.8
SONARKT-276 Fallback to latest stable Kotlin version instead of hardcoded Kotlin 1.5
SonarKotlin 2.12.0
Release notes - SonarKotlin - 2.12
New Feature
SONARKT-122 Rule S2695: "PreparedStatement" and "ResultSet" methods should be called with valid indices
SONARKT-130 Rule S2097: "equals(Any?)" should test argument type
SONARKT-131 Rule S2114: Collections should not be passed as arguments to their own methods
SONARKT-132 Rule S2116: "hashCode" and "toString" should not be called on array instances
SONARKT-134 Rule S899: Return values should not be ignored when they contain the operation status code
SONARKT-138 Rule S3981: Collection sizes and array length comparisons should make sense
SONARKT-140 Rule S2175: Inappropriate "Collection" calls should not be made
SONARKT-141 Rule S3958: Intermediate Sequence/Stream methods should not be left unused
Task
SONARKT-265 Update rules metatdata
SONARKT-266 Update external linters
SonarKotlin 2.11.0
Release notes - SonarKotlin - 2.11
Bug
SONARKT-36 Issues not always detected when `this` is used as reference
SONARKT-226 S125 is disabled silently
SONARKT-247 Potential memory leak when regex cache holds the reference to the BindingContext
SONARKT-254 Memory leak in sonar-kotlin in sonarlint because global cache never cleaned in the companion object
False-Positive
SONARKT-209 Rule S1313: Exclude local IPv4-mapped IPv6 address
SONARKT-225 Rule S1313: Exclude reserved documentation IP ranges
New Feature
SONARKT-129 Rule S1206: "equals(Any?)" and "hashCode()" should be overridden in pairs
SONARKT-207 Rule S6432: Counter Mode initialization vectors should not be reused
SONARKT-208 Rule S5542: Detect CBC mode when used with padding
SONARKT-214 Rules support PCI DSS Security Standard
SONARKT-215 Rules support OWASP ASVS Security Standard
SONARKT-246 Skip the analysis of unchanged files
Task
SONARKT-228 Update or get rid of apache commons-text in kotlin-utils
SONARKT-229 Remove dependency managament block from main gradle build file
SONARKT-230 Upgrade to Detekt v1.22.0-RC2 rule definition
SONARKT-231 Upgrade to Ktlint 0.47.1 rule definitions
SONARKT-232 Fix assert().equalsTo in test units that compare files, to avoid Windows line endings issues
SONARKT-235 Enforce license headers in other modules
SONARKT-241 Update rules metadata
SONARKT-243 Update external linters rules (Detekt, AndroidLint)
SONARKT-256 Update rules metadata
SONARKT-258 Logged message at INFO level during incremental analysis should be concise
Improvement
SONARKT-205 Update Analyzer Commons to 1.25: minor changes on Regex checks
SONARKT-222 Update Analyzer Commons to 1.27: changes in Regex check and resources loading
SONARKT-233 Support issue suppression declaration on when-case expressions
SONARKT-257 KotlinSensor should not be slow when there's no files to analyze
2.10.0
Release notes - SonarKotlin - Version 2.10
Bug
SONARKT-221 Links are broken in the manifest
SONARKT-211 Tests fail when running in environments with a dot in the path
SONARKT-203 Comment_lines metric should count '/**' comments and ignore blank lines and header-comment (if any)
SONARKT-197 S6316 should not crash when job declaration is not directly followed by a call to delay.
Documentation
SONARKT-218 Update docs to include available analyzer properties and an explanation
False-Positive
SONARKT-202 S1871 should not consider two method calls the same if they're calling different methods with the same name
SONARKT-199 S4830 misses exceptions being thrown in catch clauses
SONARKT-198 FP in S1128 in the presence of packages with the same unqualified name
Improvement
SONARKT-210 Support parsing of Kotlin 1.7 source code
SONARKT-206 Access properties 'sonar.java.binaries' and 'sonar.java.libraries' should be made using 'getStringArray' method
SONARKT-201 Update usage of sonar-plugin-api for libraries and binaries parameters
New Feature
SONARKT-217 Support parallelized generation of the BindingContext
SONARKT-200 Provide OWASP Top 10 2021 security standards for rules metadata
SONARKT-15 Being able to parse the code depending on the Kotlin version
Task
SONARKT-220 Update rules metadata
SONARKT-219 Upgrade external linter definitions