Skip to content

Releases: SonarSource/sonar-kotlin

2.21.0.5736

25 Nov 22:12
Compare
Choose a tag to compare

Release notes - SonarKotlin - 2.21

Bug

SONARKT-363 S6207: ClassCastException on certain types of Arrays.hashCode calls

SONARKT-364 ZipException in Kotlin analyzer when project depends on adwords-axis

SONARKT-387 Remove generic CatchAll rule for external linters

SONARKT-388 Bug in rule S6524: IllegalArgumentException when retrieving Fully Qualified Name

SONARKT-402 Kotlin Gradle scripts shouldn't be analyzed by KotlinSensor

SONARKT-404 IllegalArgumentException in UnusedDeferredResultCheck

SONARKT-406 java.util.zip.ZipException not handled by KotlinCoreEnvironmentToolsKt

New Feature

SONARKT-394 Add STIG metadata support

False Positive

SONARKT-374 FP in rule S100 when a function is annotated with @Composable from Jetpack

Improvement

SONARKT-354 Improve error reporting when code highlighting in messages isn't available

SONARKT-357 Enable "NOSONAR" in SonarLint

SONARKT-365 Reduce logging level to debug for not supported highlighting

SONARKT-398 Upgrade Kotlin compiler to 2.0.21

SONARKT-399 Replace kotlin-compiler-embeddable by kotlin-compiler

SONARKT-403 Execute TopDownAnalyzerFacadeForJVM even if classpath is empty

SONARKT-412 Upgrade analyzer-commons to 2.16.0

SONARKT-413 Update rules metadata

SONARKT-414 Change license to SONAR Source-Available License v1.0 (SSALv1)

SONARKT-415 Improve S6524 to comply with its description

2.20.0.4382

14 Dec 15:01
eb22cc4
Compare
Choose a tag to compare

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

30 Nov 15:45
4ef3a83
Compare
Choose a tag to compare

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

01 Sep 09:06
f408714
Compare
Choose a tag to compare

Release notes - SonarKotlin - 2.18

Improvement

SONARKT-358 Support on-demand plugin downloading

2.17.0.2902

18 Aug 08:48
f561c3d
Compare
Choose a tag to compare

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

17 Jul 16:41
194fe73
Compare
Choose a tag to compare

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

08 May 13:55
6ea5707
Compare
Choose a tag to compare

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

13 Apr 16:12
bf410be
Compare
Choose a tag to compare

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

06 Mar 14:05
9d0e3da
Compare
Choose a tag to compare

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

27 Feb 16:34
Compare
Choose a tag to compare

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