SonarSource Sonar Kotlin Versions Save

SonarSource Static Analyzer for Kotlin Code Quality and Security

2.20.0.4382

5 months ago

Release notes - SonarKotlin - 2.20

Task

SONARKT-333 Update rule description of S6518 to explicitly mention Java interop

Improvement

SONARKT-372 Improve the integration with Gradle Tooling API in the Gradle rules

SONARKT-376 S6624: Fix broken compliant example in RSPEC

SONARKT-382 Update rules metadata

2.19.0.4327

5 months ago

Release notes - SonarKotlin - 2.19

False-Positive

SONARKT-367 FP on S6517 for sealed interfaces

SONARKT-369 FP S2097 check don't consider when as a test type

New Feature

SONARKT-286 Implement rule S6619: Null checks should make sense

SONARKT-299 Implement rule S3353: Var should be val

SONARKT-301 Implement rule S6524: Collection should be immutable if contents is not changed

SONARKT-302 Implement rule S6526: Abstract class should be interface

SONARKT-303 Implement rule S6527: Function chain using "filter" should be simplified

SONARKT-304 Implement rule S6528: "find" should be replaced with "any", "none" or "contains"

Improvement

SONARKT-368 Stop raising issues when toString not implemented in rule S6218

2.18.0.2938

8 months ago

Release notes - SonarKotlin - 2.18

Improvement

SONARKT-358 Support on-demand plugin downloading

2.17.0.2902

9 months ago

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.2832

10 months ago

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.2579

1 year ago

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

1 year ago

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

2.12.1.2158

1 year ago

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

1 year ago

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

2.12.0.1956

1 year ago

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