Skip to content

Commit

Permalink
Update ParameterOrder messaging (#269)
Browse files Browse the repository at this point in the history
In some cases where the order is wrong, the suggested order might not be the best, so I'm gonna soften the message a little.
  • Loading branch information
mrmans0n committed May 23, 2024
1 parent 34d697a commit 0fb6a18
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ParameterOrder : ComposeKtVisitor {

fun createErrorMessage(currentOrder: String, properOrder: String): String = """
Parameters in a composable function should be ordered following this pattern: params without defaults, modifiers, params with defaults and optionally, a trailing function that might not have a default param.
Current params are: [$currentOrder] but should be [$properOrder].
Current params are: [$currentOrder] but could be [$properOrder].
See https://mrmans0n.github.io/compose-rules/rules/#ordering-composable-parameters-properly for more information.
""".trimIndent()
Expand Down

0 comments on commit 0fb6a18

Please sign in to comment.