mrmans0n / compose-rules

Lint rules for ktlint/detekt aimed to contribute to a healthier usage of Compose. Actively maintained and evolved fork of the Twitter Compose rules.
https://mrmans0n.github.io/compose-rules
Other
560 stars 22 forks source link

False positive ParameterNaming issue #274

Closed ede-wolf-gls closed 4 months ago

ede-wolf-gls commented 4 months ago

267 added the ParameterNaming rule. It found one issue in my code base, which looks like a false positive to me: onProceed.

One more example could be onSucceed. There might of course be more.

mrmans0n commented 4 months ago

good catches, I'll add an exceptions list for these ones 😄

mrmans0n commented 4 months ago

Found yours + some other possibilities, and added them as exceptions as well.

           "Bed",
            "Bleed",
            "Embed",
            "Exceed",
            "Feed",
            "Heed",
            "Need",
            "Proceed",
            "Seed",
            "Shed",
            "Shred",
            "Sled",
            "Speed",
            "Succeed",
            "Wed",
            "Weed",
ede-wolf-gls commented 4 months ago

Thanks for the quick fix

DennisBauer commented 4 months ago

I would suggest to also add an exclusion for the name onFocusChanged as the Modifier.onFocusChanged extension is called exactly the same. Reference: https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.Modifier).onFocusChanged(kotlin.Function1)

st-hocnguyen commented 4 months ago

@mrmans0n Please add onValueChangeFinished to exception list

androidx.compose.material3.RangeSlider(   
    onValueChangeFinished = onValueChangeFinished,
)
st-hocnguyen commented 4 months ago

@mrmans0n Please add onValueChangeFinished to exception list

androidx.compose.material3.RangeSlider(   
    onValueChangeFinished = onValueChangeFinished,
)

I have created PR #282