appKODE / detekt-rules-compose

A collection of Detekt rules for Jetpack Compose
MIT License
135 stars 8 forks source link

[MissingModifierDefaultValue] Rules in KMM #38

Closed aptech73 closed 1 month ago

aptech73 commented 1 month ago

Good afternoon, colleagues.

When using the library with Compose Multiplatform, some rules work incorrectly. I suggest adding support for KMM.

For example, functions marked actual should not have default values: Actual function cannot have default argument values, they should be declared in the expected function

However, linter highlights that modifier has no default value: Modifier parameter should have a default value: “modifier = Modifier” [MissingModifierDefaultValue]

dimsuz commented 1 month ago

Indeed, the presence of actual should be checked and the error should not be reported!

dimsuz commented 1 month ago

Fixed by #39