twitter / compose-rules

Static checks to aid with a healthy adoption of Compose
https://twitter.github.io/compose-rules
Other
1.36k stars 93 forks source link

ComposableNaming is not configurable in Detekt #107

Open ZacSweers opened 2 years ago

ZacSweers commented 2 years ago

This is a followup from #104

I've tried all of these different configurations for the new functionality and none of them appear to work. It seems to me that this rule is somehow not configurable in its release. Did I miss something in my PR?

TwitterCompose:
  # Not top level
  allowedComposableFunctionNames: ['.*Presenter']
  # ComposeNaming and ComposableNaming are both used, so tried configuring both without success
  ComposeNaming:
    active: true
    allowedComposableFunctionNames: ['.*Presenter']
  ComposableNaming:
    active: true
    allowedComposableFunctionNames: ['.*Presenter']

Repro: https://github.com/slackhq/circuit/pull/225

mrmans0n commented 2 years ago

Try this:

TwitterCompose:
  ComposableNaming:
    active: true
    allowedComposableFunctionNames: .*Presenter

If it doesn't work I'll get back to you next week (currently @ droidcon London) and we'll get it sorted out