Rule for named parameters #6201
remcomokveld
started this conversation in
Ideas
Replies: 1 comment
-
I agree that it's technically possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It is common practice to put the primary or most important Composable function parameter as last parameter to ensure that you can specify it as a trailing lambda.
For non-compasable lambda parameters like event handlers, enforcing named can often make the code much more easier to read.
For example
Since there may also be valid use not using named parameters, I wonder if this could also be done using an opt-in on the declaration side (guessing that makes implementing the rule harder because you'd need to add a detekt dependency to the compile classpath.
Something like
Beta Was this translation helpful? Give feedback.
All reactions