Closed patbeagan1 closed 1 year ago
Thank you for the PR! ComposeFunctionName
was an initial name of this rule, but then we've renamed it to be more correct and missed this spot in the README, good catch!
As for you case, I think it should be supported, but it will require rewriting this rule to use detekt's type resolution mode. And in general this is where this rule set is headed (to have rules working in that mode), so I think, eventually your case will be covered, I'll remember it (or we could have an issue for this too).
The copy/paste section of the readme has a typo in it (Compose -> Composable).
I had copied this is into the detekt yaml file in my project, and turned off
ComposeFunctionName
, only to find that the errors persisted. The new name of the rule seems to beComposableFunctionName
. Things worked as expected after updating my yaml file to beFor context on why I wanted to turn it off - some of the preview composables in my project forward to other composables that return Unit, or use themes which return Unit. The error will go off for things like this
and this